diff --git a/gradle.properties b/gradle.properties index 5a8c48254..a8e18a390 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle/run-josm-plugin-tasks.gradle b/gradle/run-josm-plugin-tasks.gradle index 5601556c7..c51b6f130 100644 --- a/gradle/run-josm-plugin-tasks.gradle +++ b/gradle/run-josm-plugin-tasks.gradle @@ -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