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

first iteration on android plugin

parent 0ec07e2c
No related branches found
No related tags found
No related merge requests found
package org.ros.gradle_plugins;
import org.gradle.api.Project;
import org.gradle.api.Plugin;
import org.gradle.api.*;
/*
* Configures java for the ros-android build environment. Pretty elementary right now,
* just applies the java plugin and defines the jdk compatibility level.
*/
class RosAndroidPlugin implements Plugin<Project> {
Project project
def void apply(Project project) {
this.project = project
if (!project.plugins.findPlugin('ros')) {
project.apply(plugin: 'ros')
}
project.extensions.create("rosandroid", RosAndroidPluginExtension)
project.rosandroid.buildToolsVersion = "17"
}
}
class RosAndroidPluginExtension {
String buildToolsVersion
}
...@@ -35,6 +35,10 @@ class RosPlugin implements Plugin<Project> { ...@@ -35,6 +35,10 @@ class RosPlugin implements Plugin<Project> {
} }
} }
} }
/*
* Could use some better handling for when this is not defined as it sets
* file://null, but it doesn't seem to hurt the process any
*/
def repoURLs = project.ros.mavenPath.collect { 'file://' + it } def repoURLs = project.ros.mavenPath.collect { 'file://' + it }
project.repositories { project.repositories {
repoURLs.each { p -> repoURLs.each { p ->
......
implementation-class=org.ros.gradle_plugins.RosAndroidPlugin
\ 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