Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Commit 743e980

Browse files
committed
clean buildscript.gradle
add maven.gradle for other projects use maven repoistories.
1 parent 1b90302 commit 743e980

File tree

2 files changed

+62
-30
lines changed

2 files changed

+62
-30
lines changed

buildscript.gradle

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,35 @@
1515
*/
1616

1717
rootProject.buildscript {
18-
String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
19-
String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
20-
21-
repositories {
22-
if (rosMavenPath != null) {
23-
rosMavenPath.tokenize(":").each { path ->
18+
String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
19+
String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
20+
repositories {
21+
if (rosMavenPath != null) {
22+
rosMavenPath.tokenize(":").each { path ->
23+
maven {
24+
// We can't use uri() here because we aren't running inside something
25+
// that implements the Script interface.
26+
url "file:${path}"
27+
}
28+
}
29+
}
2430
maven {
25-
// We can't use uri() here because we aren't running inside something
26-
// that implements the Script interface.
27-
url "file:${path}"
31+
url "http://repository.springsource.com/maven/bundles/release"
2832
}
29-
}
30-
}
31-
maven {
32-
url "http://repository.springsource.com/maven/bundles/release"
33-
}
34-
maven {
35-
url "http://repository.springsource.com/maven/bundles/external"
33+
maven {
34+
url "http://repository.springsource.com/maven/bundles/external"
35+
}
36+
if (rosMavenRepository != null) {
37+
maven {
38+
url rosMavenRepository
39+
}
40+
}
41+
maven {
42+
url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
43+
}
44+
mavenCentral()
3645
}
37-
if (rosMavenRepository != null) {
38-
maven {
39-
url rosMavenRepository
40-
}
41-
} else {
42-
maven {
43-
url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
44-
}
46+
dependencies {
47+
classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
4548
}
46-
mavenCentral()
47-
}
48-
49-
dependencies {
50-
classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
51-
}
5249
}

maven.gradle

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
rootProject.allprojects {
2+
String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
3+
String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
4+
repositories {
5+
if (rosMavenPath != null) {
6+
rosMavenPath.tokenize(":").each { path ->
7+
//noinspection GroovyAssignabilityCheck
8+
maven {
9+
// We can't use uri() here because we aren't running inside something
10+
// that implements the Script interface.
11+
url "file:${path}"
12+
}
13+
}
14+
}
15+
//noinspection GroovyAssignabilityCheck
16+
maven {
17+
url "http://repository.springsource.com/maven/bundles/release"
18+
}
19+
//noinspection GroovyAssignabilityCheck
20+
maven {
21+
url "http://repository.springsource.com/maven/bundles/external"
22+
}
23+
if (rosMavenRepository != null) {
24+
//noinspection GroovyAssignabilityCheck
25+
maven {
26+
url rosMavenRepository
27+
}
28+
}
29+
//noinspection GroovyAssignabilityCheck
30+
maven {
31+
url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
32+
}
33+
mavenCentral()
34+
}
35+
}

0 commit comments

Comments
 (0)