@@ -25,10 +25,13 @@ class RosPlugin implements Plugin<Project> {
25
25
project. apply(plugin : ' maven' )
26
26
}
27
27
/* Create project.ros.* property extensions */
28
- project. extensions. create(" ros" , RosPluginExtension )
28
+ project. extensions. create(" ros" , RosExtension )
29
29
project. ros. mavenPath = " $System . env . ROS_MAVEN_PATH " . split(' :' )
30
30
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
+ }
32
35
/*
33
36
* Could use some better handling for when this is not defined as it sets
34
37
* file://null, but it doesn't seem to hurt the process any
@@ -49,7 +52,17 @@ class RosPlugin implements Plugin<Project> {
49
52
}
50
53
}
51
54
52
- class RosPluginExtension {
55
+ /* http://www.gradle.org/docs/nightly/dsl/org.gradle.api.plugins.ExtensionAware.html */
56
+ class RosExtension {
53
57
List<String > mavenPath
54
58
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
+ }
55
68
}
0 commit comments