Skip to content

Commit 75f1e57

Browse files
authored
Merge pull request ernestmc#3 from fmessmer/offline_compilation
allow offline compilation
2 parents 97b7a1a + 070ffff commit 75f1e57

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616

1717

1818
buildscript {
19-
apply from: "https://github.com/CentralLabFacilities/rosjava_bootstrap/raw/clf/buildscript.gradle"
19+
try{
20+
apply from: "https://raw.githubusercontent.com/mojin-robotics/rosjava_bootstrap/kinetic/buildscript.gradle"
21+
} catch (all) {
22+
//local copy of rosjava_bootstrap buildscript.gradle
23+
apply from: "buildscript.gradle"
24+
}
2025
}
2126

2227
plugins {

buildscript.gradle

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright (C) 2014 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
17+
/*
18+
* @fmessmer:
19+
* This file is a copy from https://raw.githubusercontent.com/mojin-robotics/rosjava_bootstrap/kinetic/buildscript.gradle
20+
* It is copied to allow temporary offline compilation
21+
*/
22+
23+
rootProject.buildscript {
24+
String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
25+
String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
26+
repositories {
27+
if (rosMavenPath != null) {
28+
rosMavenPath.tokenize(":").each { path ->
29+
maven {
30+
// We can't use uri() here because we aren't running inside something
31+
// that implements the Script interface.
32+
url "file:${path}"
33+
}
34+
}
35+
}
36+
maven {
37+
url "http://repository.springsource.com/maven/bundles/release"
38+
}
39+
maven {
40+
url "http://repository.springsource.com/maven/bundles/external"
41+
}
42+
if (rosMavenRepository != null) {
43+
maven {
44+
url rosMavenRepository
45+
}
46+
}
47+
maven {
48+
url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
49+
}
50+
jcenter()
51+
}
52+
dependencies {
53+
classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.3,0.4)"
54+
}
55+
}

0 commit comments

Comments
 (0)