Added examples.
This commit is contained in:
parent
877e4bd622
commit
474263452f
85 changed files with 2429 additions and 107 deletions
58
examples/kotlin/build.gradle.kts
Normal file
58
examples/kotlin/build.gradle.kts
Normal file
|
@ -0,0 +1,58 @@
|
|||
import net.thauvin.erik.gradle.semver.SemverConfig
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath("net.thauvin.erik.gradle:semver:0.9.2-beta")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.2.50"
|
||||
application
|
||||
}
|
||||
|
||||
apply {
|
||||
plugin("net.thauvin.erik.gradle.semver")
|
||||
}
|
||||
|
||||
// ./gradlew
|
||||
// ./gradlew incrementPatch run
|
||||
// ./gradlew incrementMinor run
|
||||
// ./gradlew incrementMajor run
|
||||
|
||||
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
||||
|
||||
dependencies {
|
||||
compile(kotlin("stdlib"))
|
||||
testCompile("org.testng:testng:6.14.3")
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
application {
|
||||
mainClassName = "com.example.MainKt"
|
||||
}
|
||||
|
||||
configure<SemverConfig> {
|
||||
//properties = "example.properties"
|
||||
//keysPrefix = "example."
|
||||
//preReleaseKey = "release"
|
||||
//buildMetaKey = "meta"
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType(Test::class.java).all {
|
||||
useTestNG()
|
||||
}
|
||||
|
||||
val run by getting {
|
||||
doFirst {
|
||||
println("Version: $version")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue