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

Commit acdcc8f

Browse files
committed
switch to springsource for dependencies, install interface generator as an app, add buildscript, 0.2.0
1 parent 6896348 commit acdcc8f

File tree

7 files changed

+81
-29
lines changed

7 files changed

+81
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.gradle
22
build
33

4+
/bin

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ project(rosjava_bootstrap)
1111

1212
find_package(catkin REQUIRED rosjava_build_tools)
1313

14-
catkin_rosjava_setup(publishMavenJavaPublicationToMavenRepository)
14+
catkin_rosjava_setup(publishMavenJavaPublicationToMavenRepository installApp)
1515

1616
catkin_package()
1717

build.gradle

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,34 @@ task wrapper(type: Wrapper) {
1818
gradleVersion = '1.11'
1919
}
2020

21-
project.ext {
22-
/* the ros plugin defines this, but since we're building the plugin... */
23-
rosMavenDeploymentRepository = "$System.env.ROS_MAVEN_DEPLOYMENT_REPOSITORY"
24-
rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':')
25-
rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
26-
}
27-
2821
allprojects {
29-
group='org.ros.rosjava_bootstrap'
30-
version = '0.1.21'
22+
group="org.ros.rosjava_bootstrap"
23+
version = "0.2.0"
3124
}
3225

3326
subprojects {
34-
/* Have to manually do this below since our gradle plugin is our sub project */
3527
apply plugin: 'java'
3628
apply plugin: 'maven'
3729
apply plugin: 'maven-publish'
3830

3931
sourceCompatibility = 1.6
4032
targetCompatibility = 1.6
4133

34+
// These external repositories are copied from bootstrap.gradle.
4235
repositories {
43-
mavenLocal()
36+
mavenCentral()
4437
maven {
45-
url project.rosMavenRepository
38+
url "http://repository.springsource.com/maven/bundles/release"
39+
}
40+
maven {
41+
url "http://repository.springsource.com/maven/bundles/external"
4642
}
47-
mavenCentral()
4843
}
49-
if ( project.rosMavenDeploymentRepository != 'null' && project.rosMavenDeploymentRepository != '' ) {
44+
45+
// Configuration of the deployment repository is copied from the RosPlugin.
46+
String mavenDeploymentRepository = System.getenv("ROS_MAVEN_DEPLOYMENT_REPOSITORY")
47+
if (mavenDeploymentRepository != null &&
48+
mavenDeploymentRepository != "") {
5049
publishing {
5150
publications {
5251
mavenJava(MavenPublication) {
@@ -55,11 +54,13 @@ subprojects {
5554
}
5655
repositories {
5756
maven {
58-
url 'file://' + project.rosMavenDeploymentRepository
57+
url 'file://' + mavenDeploymentRepository
5958
}
6059
}
6160
}
61+
} else {
62+
logger.warn("ROS_MAVEN_DEPLOYMENT_REPOSITORY is not set. Have you sourced setup.bash?")
6263
}
6364
}
6465

65-
defaultTasks 'install'
66+
defaultTasks 'publishMavenJavaPublicationToMavenRepository', 'installApp'

buildscript.gradle

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
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 ->
24+
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}"
28+
}
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"
36+
}
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+
}
45+
}
46+
mavenCentral()
47+
}
48+
49+
dependencies {
50+
classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
51+
}
52+
}

message_generation/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
*/
1616

1717
dependencies {
18-
compile 'io.netty:netty:3.5.2.Final'
19-
compile 'com.google.guava:guava:12.0'
20-
compile 'org.apache.commons:com.springsource.org.apache.commons.codec:1.3.0'
21-
compile 'org.apache.commons:com.springsource.org.apache.commons.io:1.4.0'
22-
compile 'commons-pool:commons-pool:1.6'
23-
compile 'org.apache.commons:com.springsource.org.apache.commons.lang:2.4.0'
24-
compile project(':gradle_plugins')
18+
compile "com.google.guava:guava:12.0"
19+
compile "commons-pool:commons-pool:1.6"
20+
compile "io.netty:netty:3.5.2.Final"
21+
compile "org.apache.commons:com.springsource.org.apache.commons.codec:1.3.0"
22+
compile "org.apache.commons:com.springsource.org.apache.commons.io:1.4.0"
23+
compile "org.apache.commons:com.springsource.org.apache.commons.lang:2.4.0"
24+
testCompile "junit:junit:4.8.2"
2525
}
2626

2727
apply plugin: "application"

package.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>rosjava_bootstrap</name>
4-
<version>0.1.21</version>
4+
<version>0.2.0</version>
55
<description>
66
Bootstrap utilities for rosjava builds.
77
</description>
88
<url>http://ros.org/wiki/rosjava_bootstrap</url>
99
<maintainer email="[email protected]">Daniel Stonier</maintainer>
10-
<author email="[email protected]">Daniel Stonier</author>
11-
<author email="[email protected]">Damon Kohler</author>
10+
<author>Daniel Stonier</author>
11+
<author>Damon Kohler</author>
1212
<license>Apache 2.0</license>
1313
<buildtool_depend>catkin</buildtool_depend>
1414
<build_depend>rosjava_build_tools</build_depend>

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@
1414
* the License.
1515
*/
1616

17-
/* rootProject.name = 'catkin' */
18-
1917
include 'gradle_plugins'
2018
include 'message_generation'

0 commit comments

Comments
 (0)