Issue of building application with modified rosjava modules
Symptom
The modified rosjava core modules like rocon_rosjava_core, common_tools and so on do not be applied when user application is building with following build script. It is because the upgraded gradle build script includes github maven repository.
Reference: https://raw.githubusercontent.com/rosjava/rosjava_bootstrap/indigo/buildscript.gradle
Solution
There are two options for applying modified module when user application is building.
- Option 1:
- Version bump of modules and clear statement bumped version in your build script.
dependencies { compile 'com.github.rosjava.android_remocons:common_tools:0.2.1' //bumped version compile 'org.ros.android_core:android_10:[0.2,0.3)]' compile 'org.ros.rosjava_core:rosjava:0.1.+' compile 'org.ros.rosjava_messages:turtlebot_msgs:2.2.+' }
Reference:https://github.com/turtlebot/turtlebot_android/blob/indigo/follower/build.gradle#L17-L22
- Option 2:
- Modified build script in order to reference only local maven repository like bottom.
Original
buildscript { apply from: "https://github.com/rosjava/android_core/raw/indigo/buildscript.gradle" }
Reference:https://github.com/rosjava/android_remocons/blob/indigo/build.gradle#L21-L23
Modified
buildscript { def rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':').collect { 'file://' + it } repositories { rosMavenPath.each { p -> maven { url p } } mavenLocal() } dependencies { classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '[0.1,0.2)' } }
Reference: