Skip to content

Commit

Permalink
Fix runJosm task, copy the plugin *.jar regardless of name
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Apr 10, 2017
1 parent 72d9fff commit bd8a05a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ plugin.requires=apache-commons;apache-http
#plugin.early=...
#plugin.stage=...

# The name for the JAR file produced by Gradle (optional, defaults to ${project.name})
plugin.jar.name=Mapillary
# The name for the JAR file produced by Gradle (optional, if not provided the *.jar file in the build/libs/ directory is used without renaming)
plugin.jar.name=Mapillary.jar

tool.pmd.version=5.5.5
tool.findbugs.version=3.0.1
Expand Down
13 changes: 9 additions & 4 deletions gradle/run-josm-plugin-tasks.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply from: buildscript.sourceFile.parentFile.path + '/run-josm-config.gradle'
apply from: buildscript.sourceFile.parentFile.path + '/run-josm-tasks.gradle'

task updatePluginDependencies(type: Copy) {
from configurations.requiredPlugin
into "$tmpJosmHome/plugins"
rename('(.*)-\\.jar', '$1.jar')
}

task updateCurrentPlugin(type: Copy) {
description 'Puts the plugin-JAR generated by the `jar`-task into `build/.josm/`'
dependsOn jar
dependsOn initJosmPrefs
from configurations.requiredPlugin
from "$buildDir/libs/${project.name}.jar"
dependsOn updatePluginDependencies
from jar.outputs
into "$tmpJosmHome/plugins"
rename('(.*)-\\.jar', '$1.jar')
rename(project.name, project.hasProperty('plugin.jar.name') ? project.property('plugin.jar.name') : project.name)
rename('.*', project.hasProperty('plugin.jar.name') ? project.property('plugin.jar.name') : '$1')
}
updateJosmPlugins.dependsOn updateCurrentPlugin

0 comments on commit bd8a05a

Please sign in to comment.