Updated example to cat the version properties file.

This commit is contained in:
Erik C. Thauvin 2018-07-07 01:40:16 -07:00
parent abe1ca269c
commit b50f2bad9a
10 changed files with 58 additions and 26 deletions

View file

@ -38,9 +38,12 @@ tasks {
useTestNG()
}
val run by getting {
val run by getting(JavaExec::class) {
doFirst {
println("Version: $version")
}
// args = listof("example.properties")
args = listOf("version.properties")
}
}

View file

@ -1,3 +1,16 @@
package com.example
fun main(args: Array<String>) = println("Hello world.")
import java.io.File
fun main(args: Array<String>) {
if (args.size == 1) {
File(args[0]).apply {
if (exists()) {
println("> cat $name")
forEachLine {
println(it)
}
}
}
}
}

View file

@ -1,5 +1,5 @@
#Generated by the Semver Plugin for Gradle
#Tue Jul 03 11:42:03 PDT 2018
#Sat Jul 07 00:50:57 PDT 2018
version.prerelease=
version.buildmeta=
version.patch=0