Skip to content

Commit 12bee5d

Browse files
authored
Merge pull request #1 from fmessmer/offline_compilation
allow offline compilation
2 parents 6df08c8 + 1a703e7 commit 12bee5d

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
@@ -19,7 +19,12 @@ task wrapper(type: Wrapper) {
1919
}
2020

2121
buildscript {
22-
apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/kinetic/buildscript.gradle"
22+
try{
23+
apply from: "https://raw.githubusercontent.com/mojin-robotics/rosjava_bootstrap/kinetic/buildscript.gradle"
24+
} catch (all) {
25+
//local copy of rosjava_bootstrap buildscript.gradle
26+
apply from: "buildscript.gradle"
27+
}
2328
}
2429

2530
apply plugin: "catkin"

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)