Updated examples.

This commit is contained in:
Erik C. Thauvin 2019-04-05 23:12:33 -07:00
parent e2f55f33e2
commit 87ddaec8b8
10 changed files with 84 additions and 44 deletions

View file

@ -31,6 +31,17 @@ application {
mainClassName = "com.example.Main"
}
tasks {
"run"(JavaExec::class) {
doFirst {
println("Verion: $version")
}
// args = listOf("example.properties")
args = listOf("version.properties")
}
}
semver {
// properties = "example.properties"
// keysPrefix = "example."

View file

@ -1,6 +1,7 @@
package com.example
import net.thauvin.erik.semver.Version
import java.io.File
import java.text.SimpleDateFormat
@Version(properties = "version.properties", type = "kt")
@ -28,6 +29,17 @@ class Main {
println(" BuildMetaData: ${GeneratedVersion.BUILDMETA}")
println("-----------------------------------------------------")
if (args.size == 1) {
File(args[0]).apply {
if (exists()) {
println("> cat $name")
forEachLine {
println(it)
}
}
}
}
}
}
}

View file

@ -1,7 +1,8 @@
#Generated by the Semver Plugin for Gradle
#Thu Nov 29 20:35:47 PST 2018
#Fri Apr 05 22:56:48 PDT 2019
version.buildmeta=
version.major=11
version.minor=2
version.patch=4
version.minor=7
version.patch=0
version.prerelease=
version.project=Kotlin Example