diff --git a/buildscript.gradle b/buildscript.gradle index 83d0627450076178cff03dd9059ce4f1f385fee1..94fe0c6a472a4cb7965191168c42d49ef60b82e2 100644 --- a/buildscript.gradle +++ b/buildscript.gradle @@ -15,38 +15,35 @@ */ rootProject.buildscript { - String rosMavenPath = System.getenv("ROS_MAVEN_PATH") - String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY") - - repositories { - if (rosMavenPath != null) { - rosMavenPath.tokenize(":").each { path -> + String rosMavenPath = System.getenv("ROS_MAVEN_PATH") + String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY") + repositories { + if (rosMavenPath != null) { + rosMavenPath.tokenize(":").each { path -> + maven { + // We can't use uri() here because we aren't running inside something + // that implements the Script interface. + url "file:${path}" + } + } + } maven { - // We can't use uri() here because we aren't running inside something - // that implements the Script interface. - url "file:${path}" + url "http://repository.springsource.com/maven/bundles/release" } - } - } - maven { - url "http://repository.springsource.com/maven/bundles/release" - } - maven { - url "http://repository.springsource.com/maven/bundles/external" + maven { + url "http://repository.springsource.com/maven/bundles/external" + } + if (rosMavenRepository != null) { + maven { + url rosMavenRepository + } + } + maven { + url "https://github.com/rosjava/rosjava_mvn_repo/raw/master" + } + mavenCentral() } - if (rosMavenRepository != null) { - maven { - url rosMavenRepository - } - } else { - maven { - url "https://github.com/rosjava/rosjava_mvn_repo/raw/master" - } + dependencies { + classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)" } - mavenCentral() - } - - dependencies { - classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)" - } } diff --git a/maven.gradle b/maven.gradle new file mode 100644 index 0000000000000000000000000000000000000000..073385d4a36a347ff119dd3efd0b7d55f5235588 --- /dev/null +++ b/maven.gradle @@ -0,0 +1,35 @@ +rootProject.allprojects { + String rosMavenPath = System.getenv("ROS_MAVEN_PATH") + String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY") + repositories { + if (rosMavenPath != null) { + rosMavenPath.tokenize(":").each { path -> + //noinspection GroovyAssignabilityCheck + maven { + // We can't use uri() here because we aren't running inside something + // that implements the Script interface. + url "file:${path}" + } + } + } + //noinspection GroovyAssignabilityCheck + maven { + url "http://repository.springsource.com/maven/bundles/release" + } + //noinspection GroovyAssignabilityCheck + maven { + url "http://repository.springsource.com/maven/bundles/external" + } + if (rosMavenRepository != null) { + //noinspection GroovyAssignabilityCheck + maven { + url rosMavenRepository + } + } + //noinspection GroovyAssignabilityCheck + maven { + url "https://github.com/rosjava/rosjava_mvn_repo/raw/master" + } + mavenCentral() + } +}