Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Gradle: tweaks for syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Jan 9, 2022
1 parent e5c9844 commit 5317551
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
Expand Up @@ -35,17 +35,17 @@ if (dotgit.exists()) {
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()
val baseVersion = details.lastTag.substring(1)
if (details.isCleanTag) { // release version
version = baseVersion
version = if (details.isCleanTag) { // release version
baseVersion
} else { // snapshot version
version = baseVersion + "-" + details.commitDistance + "-" + details.gitHash + "-SNAPSHOT"
baseVersion + "-" + details.commitDistance + "-" + details.gitHash + "-SNAPSHOT"
}
} else if (props.exists()) { // when version.properties already exist, just use it.
version = getProps(props).getProperty("version")
}

tasks.register("writeVersionFile") {
val folder = project.file("src/main/resources");
val folder = project.file("src/main/resources")
if (!folder.exists()) {
folder.mkdirs()
}
Expand All @@ -63,7 +63,7 @@ application {
mainClass.set("io.github.eb4j.ebview.EBViewer")
}

val home = System.getProperty("user.home")
val home = System.getProperty("user.home")!!
tasks.register<JavaExec>("projectorRun") {
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("io.github.eb4j.ebview.EBViewer")
Expand Down

0 comments on commit 5317551

Please sign in to comment.