Updated example to cat the version properties file.
This commit is contained in:
parent
abe1ca269c
commit
b50f2bad9a
10 changed files with 58 additions and 26 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue