@@ -25,10 +25,13 @@ class RosPlugin implements Plugin<Project> {
2525 project. apply(plugin : ' maven' )
2626 }
2727 /* Create project.ros.* property extensions */
28- project. extensions. create(" ros" , RosPluginExtension )
28+ project. extensions. create(" ros" , RosExtension )
2929 project. ros. mavenPath = " $System . env . ROS_MAVEN_PATH " . split(' :' )
3030 project. ros. mavenDeploymentRepository = " $System . env . ROS_MAVEN_DEPLOYMENT_REPOSITORY "
31- project. ros. mavenRepository = " $System . env . ROS_MAVEN_REPOSITORY "
31+ def mavenRepository = " $System . env . ROS_MAVEN_REPOSITORY "
32+ if ( mavenRepository != ' null' ) {
33+ project. ros. mavenRepository = mavenRepository
34+ }
3235 /*
3336 * Could use some better handling for when this is not defined as it sets
3437 * file://null, but it doesn't seem to hurt the process any
@@ -49,7 +52,17 @@ class RosPlugin implements Plugin<Project> {
4952 }
5053}
5154
52- class RosPluginExtension {
55+ /* http://www.gradle.org/docs/nightly/dsl/org.gradle.api.plugins.ExtensionAware.html */
56+ class RosExtension {
5357 List<String > mavenPath
5458 String mavenDeploymentRepository
59+ String mavenRepository
60+ String mavenRepositoryD
61+
62+ RosExtension () {
63+ /* Initialising the strings here gets rid of the dynamic property deprecated warnings. */
64+ this . mavenDeploymentRepository = " "
65+ this . mavenRepository = " https://github.com/rosjava/rosjava_mvn_repo/raw/master"
66+ this . mavenRepositoryD = " https://github.com/rosjava/rosjava_mvn_repo/raw/master"
67+ }
5568}
0 commit comments