Skip to content

Commit

Permalink
Declare dependencies on josm-latest or josm-tested as changing
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Dec 10, 2017
1 parent 35615f9 commit d1e053f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.openstreetmap.josm.gradle.plugin

import org.gradle.api.artifacts.ExternalModuleDependency
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down Expand Up @@ -69,7 +70,18 @@ class JosmPlugin implements Plugin<Project> {

project.afterEvaluate {
// Adding dependencies for JOSM and the required plugins
project.dependencies.add('implementation', 'org.openstreetmap.josm:josm:'+project.josm.josmCompileVersion)
project.dependencies.add(
'implementation',
'org.openstreetmap.josm:josm:' + project.josm.josmCompileVersion,
{ExternalModuleDependency d ->
if ("latest".equals(project.josm.josmCompileVersion) || "tested".equals(project.josm.josmCompileVersion)) {
project.logger.info 'Compile against the variable JOSM version ' + project.josm.josmCompileVersion
d.changing = true
} else {
project.logger.info 'Compile against the JOSM version ' + project.josm.josmCompileVersion
}
}
)
requirePlugins(project, project.josm.manifest.pluginDependencies.toArray(new String[project.josm.manifest.pluginDependencies.size()]))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class I18nConfig {
def Closure pathTransformer = Closure.IDENTITY

public final Closure getGithubPathTransformer(final String repoSlug) {
println 'Get Github transformer for ' + repoSlug
return { final String path ->
Matcher lineNumberMatcher = Pattern.compile(".*:([1-9][0-9]*)").matcher(path)
String lineNumber = null
Expand Down

0 comments on commit d1e053f

Please sign in to comment.