Kotlin-dsl syntax updates.
This commit is contained in:
parent
3485d314e0
commit
ab85a04113
3 changed files with 5 additions and 8 deletions
|
@ -56,7 +56,7 @@ tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val check by getting {
|
"check" {
|
||||||
dependsOn("ktlintCheck")
|
dependsOn("ktlintCheck")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import net.thauvin.erik.gradle.semver.SemverConfig
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.2.50"
|
kotlin("jvm") version "1.2.50"
|
||||||
application
|
application
|
||||||
|
@ -32,7 +30,7 @@ application {
|
||||||
mainClassName = "com.example.Main"
|
mainClassName = "com.example.Main"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<SemverConfig> {
|
semver {
|
||||||
// properties = "example.properties"
|
// properties = "example.properties"
|
||||||
// keysPrefix = "example."
|
// keysPrefix = "example."
|
||||||
// preReleaseKey = "release"
|
// preReleaseKey = "release"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import net.thauvin.erik.gradle.semver.SemverConfig
|
|
||||||
import net.thauvin.erik.gradle.semver.SemverIncrementBuildMetaTask
|
import net.thauvin.erik.gradle.semver.SemverIncrementBuildMetaTask
|
||||||
import java.lang.String.format
|
import java.lang.String.format
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
@ -31,7 +30,7 @@ application {
|
||||||
mainClassName = "com.example.MainKt"
|
mainClassName = "com.example.MainKt"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<SemverConfig> {
|
semver {
|
||||||
// properties = "example.properties"
|
// properties = "example.properties"
|
||||||
// keysPrefix = "example."
|
// keysPrefix = "example."
|
||||||
// preReleaseKey = "release"
|
// preReleaseKey = "release"
|
||||||
|
@ -43,14 +42,14 @@ tasks {
|
||||||
useTestNG()
|
useTestNG()
|
||||||
}
|
}
|
||||||
|
|
||||||
val incrementBuildMeta by getting(SemverIncrementBuildMetaTask::class) {
|
"incrementBuildMeta"(SemverIncrementBuildMetaTask::class) {
|
||||||
doFirst {
|
doFirst {
|
||||||
// buildMeta = format("%03d", buildMeta.toInt() + 1)
|
// buildMeta = format("%03d", buildMeta.toInt() + 1)
|
||||||
buildMeta = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))
|
buildMeta = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val run by getting(JavaExec::class) {
|
"run"(JavaExec::class) {
|
||||||
doFirst {
|
doFirst {
|
||||||
println("Version: $version")
|
println("Version: $version")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue