Skip to content
Snippets Groups Projects
Commit acdcc8fc authored by Daniel Stonier's avatar Daniel Stonier
Browse files

switch to springsource for dependencies, install interface generator as an...

switch to springsource for dependencies, install interface generator as an app, add buildscript, 0.2.0
parent 6896348e
Branches
Tags
No related merge requests found
.gradle .gradle
build build
/bin
...@@ -11,7 +11,7 @@ project(rosjava_bootstrap) ...@@ -11,7 +11,7 @@ project(rosjava_bootstrap)
find_package(catkin REQUIRED rosjava_build_tools) find_package(catkin REQUIRED rosjava_build_tools)
catkin_rosjava_setup(publishMavenJavaPublicationToMavenRepository) catkin_rosjava_setup(publishMavenJavaPublicationToMavenRepository installApp)
catkin_package() catkin_package()
......
...@@ -18,20 +18,12 @@ task wrapper(type: Wrapper) { ...@@ -18,20 +18,12 @@ task wrapper(type: Wrapper) {
gradleVersion = '1.11' gradleVersion = '1.11'
} }
project.ext {
/* the ros plugin defines this, but since we're building the plugin... */
rosMavenDeploymentRepository = "$System.env.ROS_MAVEN_DEPLOYMENT_REPOSITORY"
rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':')
rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
}
allprojects { allprojects {
group='org.ros.rosjava_bootstrap' group="org.ros.rosjava_bootstrap"
version = '0.1.21' version = "0.2.0"
} }
subprojects { subprojects {
/* Have to manually do this below since our gradle plugin is our sub project */
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
...@@ -39,14 +31,21 @@ subprojects { ...@@ -39,14 +31,21 @@ subprojects {
sourceCompatibility = 1.6 sourceCompatibility = 1.6
targetCompatibility = 1.6 targetCompatibility = 1.6
// These external repositories are copied from bootstrap.gradle.
repositories { repositories {
mavenLocal() mavenCentral()
maven { maven {
url project.rosMavenRepository url "http://repository.springsource.com/maven/bundles/release"
}
maven {
url "http://repository.springsource.com/maven/bundles/external"
} }
mavenCentral()
} }
if ( project.rosMavenDeploymentRepository != 'null' && project.rosMavenDeploymentRepository != '' ) {
// Configuration of the deployment repository is copied from the RosPlugin.
String mavenDeploymentRepository = System.getenv("ROS_MAVEN_DEPLOYMENT_REPOSITORY")
if (mavenDeploymentRepository != null &&
mavenDeploymentRepository != "") {
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
...@@ -55,11 +54,13 @@ subprojects { ...@@ -55,11 +54,13 @@ subprojects {
} }
repositories { repositories {
maven { maven {
url 'file://' + project.rosMavenDeploymentRepository url 'file://' + mavenDeploymentRepository
} }
} }
} }
} else {
logger.warn("ROS_MAVEN_DEPLOYMENT_REPOSITORY is not set. Have you sourced setup.bash?")
} }
} }
defaultTasks 'install' defaultTasks 'publishMavenJavaPublicationToMavenRepository', 'installApp'
/*
* Copyright (C) 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
rootProject.buildscript {
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 {
url "http://repository.springsource.com/maven/bundles/release"
}
maven {
url "http://repository.springsource.com/maven/bundles/external"
}
if (rosMavenRepository != null) {
maven {
url rosMavenRepository
}
} else {
maven {
url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
}
}
mavenCentral()
}
dependencies {
classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
}
}
\ No newline at end of file
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
*/ */
dependencies { dependencies {
compile 'io.netty:netty:3.5.2.Final' compile "com.google.guava:guava:12.0"
compile 'com.google.guava:guava:12.0' compile "commons-pool:commons-pool:1.6"
compile 'org.apache.commons:com.springsource.org.apache.commons.codec:1.3.0' compile "io.netty:netty:3.5.2.Final"
compile 'org.apache.commons:com.springsource.org.apache.commons.io:1.4.0' compile "org.apache.commons:com.springsource.org.apache.commons.codec:1.3.0"
compile 'commons-pool:commons-pool:1.6' compile "org.apache.commons:com.springsource.org.apache.commons.io:1.4.0"
compile 'org.apache.commons:com.springsource.org.apache.commons.lang:2.4.0' compile "org.apache.commons:com.springsource.org.apache.commons.lang:2.4.0"
compile project(':gradle_plugins') testCompile "junit:junit:4.8.2"
} }
apply plugin: "application" apply plugin: "application"
......
<?xml version="1.0"?> <?xml version="1.0"?>
<package> <package>
<name>rosjava_bootstrap</name> <name>rosjava_bootstrap</name>
<version>0.1.21</version> <version>0.2.0</version>
<description> <description>
Bootstrap utilities for rosjava builds. Bootstrap utilities for rosjava builds.
</description> </description>
<url>http://ros.org/wiki/rosjava_bootstrap</url> <url>http://ros.org/wiki/rosjava_bootstrap</url>
<maintainer email="d.stonier@gmail.com">Daniel Stonier</maintainer> <maintainer email="d.stonier@gmail.com">Daniel Stonier</maintainer>
<author email="d.stonier@gmail.com">Daniel Stonier</author> <author>Daniel Stonier</author>
<author email="damonkohler@google.com">Damon Kohler</author> <author>Damon Kohler</author>
<license>Apache 2.0</license> <license>Apache 2.0</license>
<buildtool_depend>catkin</buildtool_depend> <buildtool_depend>catkin</buildtool_depend>
<build_depend>rosjava_build_tools</build_depend> <build_depend>rosjava_build_tools</build_depend>
......
...@@ -14,7 +14,5 @@ ...@@ -14,7 +14,5 @@
* the License. * the License.
*/ */
/* rootProject.name = 'catkin' */
include 'gradle_plugins' include 'gradle_plugins'
include 'message_generation' include 'message_generation'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment