Updates wpilib to use different repos for the different build versions, instead of using classifiers

Change-Id: Ic4cd1f1f93ae1036834cdcf1d0f1499fc946a429
This commit is contained in:
Fredric Silberberg
2015-11-25 10:56:30 -05:00
parent 5c82146549
commit d0c01ac30d
8 changed files with 21 additions and 46 deletions

View File

@@ -1,18 +1,15 @@
def enableSimulation = hasProperty('enableSimulation')
def repoBaseUrl = 'http://first.wpi.edu/FRC/roborio/maven'
def publishUrl = "${System.getProperty('user.home')}/releases/maven/"
// If we have the repo property, we want to delete the cached version of the networktables
// dependency and redownload it from the given repo
if (!hasProperty('repo')) {
ext.repo = 'development'
}
def repoBaseUrl = "http://first.wpi.edu/FRC/roborio/maven/${repo}"
def publishUrl = "${System.getProperty('user.home')}/releases/maven/${repo}"
allprojects {
ext.enableSimulation = enableSimulation
ext.repo = repo
ext.useExtension = 'release' != repo
repositories {
mavenCentral()
@@ -24,10 +21,6 @@ allprojects {
url repoBaseUrl
}
}
ext.getClassifier = {
return useExtension ? "-$repo" : ''
}
}
subprojects {
@@ -45,7 +38,7 @@ subprojects {
ext.setupWpilibRepo = { publishing ->
publishing.repositories.maven {
url = "${System.getProperty('user.home')}/releases/maven/"
url = "${System.getProperty('user.home')}/releases/maven/${repo}"
}
}
}

View File

@@ -20,7 +20,7 @@ niLibraryTree.each { lib ->
}
def ntDependency =
project.dependencies.create("edu.wpi.first.wpilib.networktables.cpp:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}@zip")
project.dependencies.create("edu.wpi.first.wpilib.networktables.cpp:NetworkTables:3.0.0-SNAPSHOT:arm@zip")
def config = project.configurations.detachedConfiguration(ntDependency)
config.setTransitive(false)
def netTables = config.files[0].canonicalFile
@@ -176,4 +176,4 @@ subprojects {
}
}
}
}
}

View File

@@ -104,12 +104,7 @@ project(':hal').tasks.whenTaskAdded { task ->
publishing {
publications {
wpilibc(MavenPublication) {
artifact wpilibcZip {
// Trim the leading '-' off the classifier if we are using one
if (useExtension) {
classifier = project.getClassifier()[1..-1]
}
}
artifact wpilibcZip
groupId 'edu.wpi.first.wpilib.cmake'
artifactId 'cpp-root'
version '1.0.0'

View File

@@ -1,11 +1,7 @@
publishing {
publications {
wpilibcSim(MavenPublication) {
artifact wpilibcSimZip {
if (useExtension) {
classifier = project.getClassifier()[1..-1]
}
}
artifact wpilibcSimZip
groupId 'edu.wpi.first.wpilibc.simulation'
artifactId 'WPILibCSim'
version '0.1.0'
@@ -24,4 +20,4 @@ task wpilibcSimZip(type: Zip) {
from '../build/simulation/gz_msgs/generated'
from netTablesInclude
from '../hal/include'
}
}

View File

@@ -9,8 +9,8 @@ sourceSets {
dependencies {
athenaCompile sourceSets.shared.output
athenaCompile "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
athenaRuntime "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
athenaCompile 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
athenaRuntime 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
}
// Configuration for the HAL bindings
@@ -50,17 +50,12 @@ model {
publishing {
publications {
wpilibj(MavenPublication) {
artifact jar {
// Trim the beginning '-' off the classifier
if (useExtension) {
classifier = project.getClassifier()[1..-1]
}
}
artifact jar
artifact(wpilibjSources) {
classifier "sources${project.getClassifier()}"
classifier "sources"
}
artifact(wpilibjJavadoc) {
classifier "javadoc${project.getClassifier()}"
classifier "javadoc"
}
groupId 'edu.wpi.first.wpilibj'

View File

@@ -6,8 +6,8 @@ sourceSets {
}
dependencies {
sharedCompile "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
sharedRuntime "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
sharedCompile 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
sharedRuntime 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
}
apply from: 'athena.gradle'

View File

@@ -5,7 +5,7 @@ sourceSets {
dependencies {
simCompile sourceSets.shared.output
simCompile project(':simulation:JavaGazebo')
simCompile "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
simCompile 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
}
task wpilibjSimJar(type: Jar, dependsOn: simClasses) {
@@ -42,16 +42,12 @@ task wpilibjSimJavadocJar(type: Jar, dependsOn: wpilibjSimJavadoc) {
publishing {
publications {
wpilibjSim(MavenPublication) {
artifact wpilibjSimJar {
if (useExtension) {
classifier = project.getClassifier()[1..-1]
}
}
artifact wpilibjSimJar
artifact(wpilibjSimSources) {
classifier = "sources${project.getClassifier()}"
classifier = "sources"
}
artifact(wpilibjSimJavadocJar) {
classifier "javadoc${project.getClassifier()}"
classifier "javadoc"
}
groupId 'edu.wpi.first.wpilibj'

View File

@@ -19,7 +19,7 @@ dependencies {
compile wpilibj.sourceSets.shared.output
compile wpilibj.sourceSets.athena.output
compile files(wpilibj.jar.archivePath)
compile "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm${getClassifier()}"
compile 'edu.wpi.first.wpilib.networktables.java:NetworkTables:3.0.0-SNAPSHOT:arm'
compile 'junit:junit:4.11'
compile 'com.googlecode.junit-toolbox:junit-toolbox:2.0'
compile 'org.apache.ant:ant:1.9.4'