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

ros plugins now working.

parent 8fa92ed6
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,6 @@ project.ext { ...@@ -23,7 +23,6 @@ project.ext {
rosMavenDeploymentPath = "$System.env.ROS_MAVEN_DEPLOYMENT_PATH" rosMavenDeploymentPath = "$System.env.ROS_MAVEN_DEPLOYMENT_PATH"
} }
allprojects { allprojects {
group='org.ros.rosjava_bootstrap' group='org.ros.rosjava_bootstrap'
} }
...@@ -43,12 +42,16 @@ subprojects { ...@@ -43,12 +42,16 @@ subprojects {
} }
if ( project.rosMavenDeploymentPath != 'null' && project.rosMavenDeploymentPath != '' ) { if ( project.rosMavenDeploymentPath != 'null' && project.rosMavenDeploymentPath != '' ) {
uploadArchives { uploadArchives {
repositories { repositories.mavenDeployer {
mavenDeployer { println("Class: " + repository(url: 'file://' + project.rosMavenDeploymentPath).getClass())
repository(url: 'file://' + project.rosMavenDeploymentPath) repository(url: 'file://' + project.rosMavenDeploymentPath)
} }
} }
/*
uploadArchives {
repositories.mavenDeployer.repository(url: 'file://' + project.rosMavenDeploymentPath)
} }
*/
} }
} }
......
package org.ros.gradle_plugins;
import org.gradle.api.Project;
import org.gradle.api.Plugin;
import org.gradle.api.*;
/*
* Configures java for the ros build environment. Pretty elementary right now,
* just applies the java plugin and defines the jdk compatibility level.
*/
class RosJavaPlugin implements Plugin<Project> {
Project project
def void apply(Project project) {
this.project = project
if (!project.plugins.findPlugin('java')) {
project.apply(plugin: org.gradle.api.plugins.JavaPlugin)
}
project.sourceCompatibility = 1.6
project.targetCompatibility = 1.6
}
}
class RosJavaPluginExtension {
String maven
}
...@@ -17,17 +17,26 @@ class RosPlugin implements Plugin<Project> { ...@@ -17,17 +17,26 @@ class RosPlugin implements Plugin<Project> {
def void apply(Project project) { def void apply(Project project) {
this.project = project this.project = project
println("RosPlugin") if (!project.plugins.findPlugin('maven')) {
project.apply(plugin: org.gradle.api.plugins.MavenPlugin)
}
/* Create project.ros.* property extensions */ /* Create project.ros.* property extensions */
project.extensions.create("ros", RosPluginExtension) project.extensions.create("ros", RosPluginExtension)
project.ros.maven = "$System.env.ROS_MAVEN_DEPLOYMENT_PATH" project.ros.maven = "$System.env.ROS_MAVEN_DEPLOYMENT_PATH"
if ( project.ros.maven != 'null' && project.ros.maven != '' ) { if ( project.ros.maven != 'null' && project.ros.maven != '' ) {
uploadArchives { project.uploadArchives {
repositories { repositories.mavenDeployer {
mavenDeployer { repository(url: 'file://' + project.ros.maven)
repository(url: 'file://' + project.rosMavenDeploymentPath) }
}
} }
project.repositories {
maven {
url 'file://' + project.ros.maven
} }
mavenLocal()
maven {
url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master'
} }
} }
} }
......
implementation-class=org.ros.gradle_plugins.RosJavaPlugin
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment