mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-20 13:47:46 +02:00
test: first timekeeping
This commit is contained in:
parent
aec5a8ddc5
commit
9875e94d04
27
build.gradle
27
build.gradle
@ -65,28 +65,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('writeVersion') {
|
tasks.register('writeVersion', WriteProperties) {
|
||||||
def propsFile = file("$projectDir/app/common/src/main/resources/version.properties")
|
outputFile = layout.projectDirectory.file('app/common/src/main/resources/version.properties')
|
||||||
def propsDir = propsFile.parentFile
|
println "Writing version.properties to ${outputFile.path}"
|
||||||
|
comment "${new Date()}"
|
||||||
doLast {
|
property 'version', project.provider { project.version.toString() }
|
||||||
if (propsDir.exists()) {
|
|
||||||
if (propsFile.exists()) {
|
|
||||||
println "File exists: $propsFile"
|
|
||||||
} else {
|
|
||||||
println "$propsFile does not exist. Creating file."
|
|
||||||
propsFile.createNewFile()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println "Creating directory: $propsDir"
|
|
||||||
propsDir.mkdirs()
|
|
||||||
propsFile.createNewFile()
|
|
||||||
}
|
|
||||||
|
|
||||||
def props = new Properties()
|
|
||||||
props.setProperty("version", version)
|
|
||||||
props.store(propsFile.newWriter(), null)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('createExe') {
|
tasks.named('createExe') {
|
||||||
|
Loading…
Reference in New Issue
Block a user