Skip to content

Commit

Permalink
Don't set the project version if git-describe fails, show custom comp…
Browse files Browse the repository at this point in the history
…ile tasks in task overview
  • Loading branch information
floscher committed Jun 16, 2018
1 parent 3f76bbe commit a5f7307
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions buildSrc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.gradle/
/build/
/out/
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void apply(@Nonnull final Project project) {
try {
project.setVersion(new GitDescriber(project.getProjectDir()).describe(true));
} catch (Exception e) {
project.setVersion("‹unknown›");
// Don't set the project version
}

// Apply the Java plugin if not available, because we rely on the `jar` task
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/task/CustomJosmVersionCompile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ open class CustomJosmVersionCompile
private lateinit var customJosm : Dependency

init {
group = "JOSM"
description = "Compile the JOSM plugin against ${if (findNextVersion) { "the first available JOSM version since" } else { "JOSM version" }} $customVersion"
classpath = additionalClasspath
source.add(sourceSet.java)
destinationDir = File(project.buildDir, "classes/java/${sourceSet.name}_${customVersion}")
Expand Down

0 comments on commit a5f7307

Please sign in to comment.