This repository was archived by the owner on Jan 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +36
-22
lines changed
gradle_plugins/src/main/groovy/org/ros/gradle_plugins Expand file tree Collapse file tree 5 files changed +36
-22
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ project(rosjava_bootstrap)
11
11
12
12
find_package (catkin REQUIRED rosjava_build_tools )
13
13
14
- catkin_rosjava_setup (uploadArchives )
14
+ catkin_rosjava_setup (publishMavenJavaPublicationToMavenRepository )
15
15
16
16
catkin_package ()
17
17
Original file line number Diff line number Diff line change @@ -26,13 +26,14 @@ project.ext {
26
26
27
27
allprojects {
28
28
group= ' org.ros.rosjava_bootstrap'
29
- version = ' 0.1.5 '
29
+ version = ' 0.1.6 '
30
30
}
31
31
32
32
subprojects {
33
33
/* Have to manually do this below since our gradle plugin is our sub project */
34
34
apply plugin : ' java'
35
35
apply plugin : ' maven'
36
+ apply plugin : ' maven-publish'
36
37
37
38
sourceCompatibility = 1.6
38
39
targetCompatibility = 1.6
@@ -50,9 +51,16 @@ subprojects {
50
51
}
51
52
}
52
53
if ( project. rosMavenDeploymentRepository != ' null' && project. rosMavenDeploymentRepository != ' ' ) {
53
- uploadArchives {
54
- repositories. mavenDeployer {
55
- repository(url : ' file://' + project. rosMavenDeploymentRepository)
54
+ publishing {
55
+ publications {
56
+ mavenJava(MavenPublication ) {
57
+ from components. java
58
+ }
59
+ }
60
+ repositories {
61
+ maven {
62
+ url ' file://' + project. rosMavenDeploymentRepository
63
+ }
56
64
}
57
65
}
58
66
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package org.ros.gradle_plugins;
2
2
3
3
import org.gradle.api.Project ;
4
4
import org.gradle.api.Plugin ;
5
+ import org.gradle.api.publish.maven.MavenPublication ;
5
6
import org.gradle.api.* ;
6
7
7
8
/*
@@ -13,17 +14,36 @@ class RosJavaPlugin implements Plugin<Project> {
13
14
14
15
def void apply (Project project ) {
15
16
this . project = project
17
+ if (! project. plugins. findPlugin(' ros' )) {
18
+ project. apply(plugin : ' ros' )
19
+ }
16
20
if (! project. plugins. findPlugin(' java' )) {
17
21
project. apply(plugin : ' java' )
18
22
}
19
- /* Disabling for now - may be source of build farm problems
23
+ if (! project. plugins. findPlugin(' maven-publish' )) {
24
+ project. apply(plugin : ' maven-publish' )
25
+ }
20
26
if (! project. plugins. findPlugin(' osgi' )) {
21
27
project. apply(plugin : ' osgi' )
22
28
}
23
- */
24
29
25
30
project. sourceCompatibility = 1.6
26
31
project. targetCompatibility = 1.6
32
+
33
+ if ( project. ros. mavenDeploymentRepository != ' null' && project. ros. mavenDeploymentRepository != ' ' ) {
34
+ project. publishing {
35
+ publications {
36
+ mavenJava(MavenPublication ) {
37
+ from project. components. java
38
+ }
39
+ }
40
+ repositories {
41
+ maven {
42
+ url ' file://' + project. ros. mavenDeploymentRepository
43
+ }
44
+ }
45
+ }
46
+ }
27
47
}
28
48
}
29
49
Original file line number Diff line number Diff line change @@ -22,19 +22,12 @@ class RosPlugin implements Plugin<Project> {
22
22
def void apply (Project project ) {
23
23
this . project = project
24
24
if (! project. plugins. findPlugin(' maven' )) {
25
- project. apply(plugin : org.gradle.api.plugins.MavenPlugin )
25
+ project. apply(plugin : ' maven ' )
26
26
}
27
27
/* Create project.ros.* property extensions */
28
28
project. extensions. create(" ros" , RosPluginExtension )
29
29
project. ros. mavenPath = " $System . env . ROS_MAVEN_PATH " . split(' :' )
30
30
project. ros. mavenDeploymentRepository = " $System . env . ROS_MAVEN_DEPLOYMENT_REPOSITORY "
31
- if ( project. ros. mavenDeploymentRepository != ' null' && project. ros. mavenDeploymentRepository != ' ' ) {
32
- project. uploadArchives {
33
- repositories. mavenDeployer {
34
- repository(url : ' file://' + project. ros. mavenDeploymentRepository)
35
- }
36
- }
37
- }
38
31
/*
39
32
* Could use some better handling for when this is not defined as it sets
40
33
* file://null, but it doesn't seem to hurt the process any
Original file line number Diff line number Diff line change @@ -21,13 +21,6 @@ dependencies {
21
21
compile ' org.apache.commons:com.springsource.org.apache.commons.io:1.4.0'
22
22
compile ' commons-pool:commons-pool:1.6'
23
23
compile ' org.apache.commons:com.springsource.org.apache.commons.lang:2.4.0'
24
-
25
24
compile project(' :gradle_plugins' )
26
25
}
27
26
28
- jar {
29
- manifest {
30
- symbolicName = ' org.ros.rosjava_messages.message_generation'
31
- }
32
- }
33
-
You can’t perform that action at this time.
0 commit comments