Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
plugins {
id 'java'
}
ext {
baseDir = project.projectDir
}

allprojects {
apply plugin: "java"
subprojects {

apply plugin: 'java'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand All @@ -15,7 +19,21 @@ allprojects {
group = "org.strongback"
version = "2017.2.1-SNAPSHOT"

repositories {
maven {
url 'http://first.wpi.edu/FRC/roborio/maven/release'
}
}

dependencies {
testCompile('junit:junit:4.12')
testCompile('org.easytesting:fest-assert:1.4')
}

}

task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}

ant.importBuild 'third-party.xml'
12 changes: 0 additions & 12 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,3 @@ strongback.version=2017.2.0
# replace the value with the URL of the WPILib Eclipse Update Site
#
wpilib.updatesite.url=http://first.wpi.edu/FRC/roborio/release/eclipse/

#
# Starting in 2017, WPILib will no longer have built-in support for the TalonSRX
# from Cross the Road Electronics (CTRE). Instead, the `CANTalon` class and associated
# functionality is available directly from CTRE as a separate JAR.
#
ctre.download.url=http://www.ctr-electronics.com/downloads/lib/CTRE_FRCLibs_NON-WINDOWS.zip

#
# The navX-MXP library is available in a ZIP file that has only the Java and C++ libraries.
#
navx.download.url=http://www.kauailabs.com/public_files/navx-mxp/navx-mxp-libs.zip
62 changes: 2 additions & 60 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<format property="current.date" pattern="yyyy-MM-dd" locale="en"/>
</tstamp>
<property file="build.properties"/>
<import file="third-party.xml" />

<property name="wpilib.dir" value="libs/wpilib"/>
<property name="wpi.libs.dir" value="${wpilib.dir}/java/current/lib"/>
<property file="${wpilib.dir}/wpilib.properties"/>
<property name="ctre.dir" value="libs/ctre"/>
<property name="ctre.libs.dir" value="${ctre.dir}/java/lib"/>
<property name="navx.dir" value="libs/navx-mxp"/>
<property name="navx.libs.dir" value="${navx.dir}/roborio/java/lib"/>
<property name="build.dir" value="build"/>

Expand Down Expand Up @@ -256,62 +256,4 @@
<entry key="wpilib.version" value="${wpilib.version}"/>
</propertyfile>
</target>

<!-- Download and install the CTRE library -->
<target name="check-for-ctre">
<condition property="ctre-missing">
<not>
<available file="${ctre.dir}" type="dir"/>
</not>
</condition>
</target>
<target name="download-ctre" depends="check-for-ctre" if="ctre-missing" >
<echo>Downloading the CTRE library and installing into '${ctre.dir}'.</echo>
<!-- Get and extra the ZIP file -->
<get src="${ctre.download.url}" dest="downloads/ctre.zip"/>
<!--copy file="/Users/rhauch/Downloads/CTRE_FRCLibs_NON-WINDOWS.zip" tofile="downloads/ctre.zip"/-->
<mkdir dir="${ctre.dir}"/>
<unzip src="downloads/ctre.zip" dest="${ctre.dir}">
</unzip>
<!-- Load the version info into a properties file -->
<loadfile property="ctre.version.properties" srcfile="${ctre.dir}/VERSION_NOTES">
<filterchain>
<!-- skip the first line -->
<headfilter lines="-1" skip="1"/>
<trim/>
<replacestring from=": " to="="/>
<replacestring from=" " to="."/>
</filterchain>
</loadfile>
<!-- Write out a property file in the CTRE directory -->
<echo file="${ctre.dir}/ctre.properties" append="false"># Downloaded and installed by Strongback build system${line.separator}</echo>
<echo file="${ctre.dir}/ctre.properties" append="true">${ctre.version.properties}</echo>
</target>

<!-- Download and extract the navX-MXP 3rd party library -->
<target name="check-for-navx">
<condition property="navx-missing">
<not>
<available file="${navx.dir}" type="dir"/>
</not>
</condition>
</target>
<target name="download-navx" depends="check-for-navx" if="navx-missing" >
<echo>Downloading the navX-MXP library and installing into '${navx.dir}'.</echo>
<get src="${navx.download.url}" dest="downloads/navx.zip"/>
<mkdir dir="${navx.dir}"/>
<unzip src="downloads/navx.zip" dest="${navx.dir}">
</unzip>
<!-- Load the version info into a property -->
<loadfile property="navx.version" srcFile="${navx.dir}/version.txt">
<filterchain>
<striplinebreaks/>
<trim/>
</filterchain>
</loadfile>
<!-- Write out a property file in the navX directory -->
<propertyfile file="${navx.dir}/navx.properties" comment="Downloaded and installed by Strongback build system">
<entry key="version" value="${navx.version}"/>
</propertyfile>
</target>
</project>
4 changes: 2 additions & 2 deletions strongback-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile project(":strongback")
compile project(":strongback-testing")
testCompile project(":strongback")
testCompile project(":strongback-testing")
}
2 changes: 1 addition & 1 deletion strongback-tools/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "maven"
}
}
14 changes: 10 additions & 4 deletions strongback/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
plugins {
id "maven"
id "jaci.openrio.gradle.GradleRIO" version "2017.1.5"
}

wpi {
wpilibVersion = '2017.3.1'
}

dependencies {
compile wpilib()
compile fileTree(dir: "${project.baseDir}/libs/ctre", include: '**/*.jar')
compile fileTree(dir: "${project.baseDir}/libs/nvax-mxp", include: '**/*.jar')
compile fileTree(dir: "${project.baseDir}/libs/wpilib", include: '**/*.jar')
compile fileTree(dir: "${project.baseDir}/libs/navx-mxp", include: '**/*.jar')
compile('io.dropwizard.metrics:metrics-core:3.1.0')

testCompile('org.easytesting:fest-assert:1.4')
compile('junit:junit:4.11')
}

compileJava.dependsOn(':download-navx')
compileJava.dependsOn(':download-ctre')
67 changes: 67 additions & 0 deletions third-party.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="strongback.thirdparty" default="download-navx">
<!-- Download and extract the navX-MXP 3rd party library -->
<property file="thirdparty.properties"/>
<property name="navx.dir" value="libs/navx-mxp"/>
<property name="ctre.dir" value="libs/ctre"/>

<target name="make-downloads-dir">
<mkdir dir="downloads" />
</target>
<!-- Download and install the CTRE library -->
<target name="check-for-ctre">
<condition property="ctre-missing">
<not>
<available file="${ctre.dir}" type="dir"/>
</not>
</condition>
</target>
<target name="download-ctre" depends="check-for-ctre,make-downloads-dir" if="ctre-missing" >
<echo>Downloading the CTRE library and installing into '${ctre.dir}'.</echo>
<!-- Get and extra the ZIP file -->
<get src="${ctre.download.url}" dest="downloads/ctre.zip"/>
<!--copy file="/Users/rhauch/Downloads/CTRE_FRCLibs_NON-WINDOWS.zip" tofile="downloads/ctre.zip"/-->
<mkdir dir="${ctre.dir}"/>
<unzip src="downloads/ctre.zip" dest="${ctre.dir}">
</unzip>
<!-- Load the version info into a properties file -->
<loadfile property="ctre.version.properties" srcfile="${ctre.dir}/VERSION_NOTES">
<filterchain>
<!-- skip the first line -->
<headfilter lines="-1" skip="1"/>
<trim/>
<replacestring from=": " to="="/>
<replacestring from=" " to="."/>
</filterchain>
</loadfile>
<!-- Write out a property file in the CTRE directory -->
<echo file="${ctre.dir}/ctre.properties" append="false"># Downloaded and installed by Strongback build system${line.separator}</echo>
<echo file="${ctre.dir}/ctre.properties" append="true">${ctre.version.properties}</echo>
</target>

<target name="check-for-navx">
<condition property="navx-missing">
<not>
<available file="${navx.dir}" type="dir"/>
</not>
</condition>
</target>
<target name="download-navx" depends="check-for-navx,make-downloads-dir" if="navx-missing" >
<echo>Downloading the navX-MXP library and installing into '${navx.dir}'.</echo>
<get src="${navx.download.url}" dest="downloads/navx.zip"/>
<mkdir dir="${navx.dir}"/>
<unzip src="downloads/navx.zip" dest="${navx.dir}">
</unzip>
<!-- Load the version info into a property -->
<loadfile property="navx.version" srcFile="${navx.dir}/version.txt">
<filterchain>
<striplinebreaks/>
<trim/>
</filterchain>
</loadfile>
<!-- Write out a property file in the navX directory -->
<propertyfile file="${navx.dir}/navx.properties" comment="Downloaded and installed by Strongback build system">
<entry key="version" value="${navx.version}"/>
</propertyfile>
</target>
</project>
11 changes: 11 additions & 0 deletions thirdparty.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Starting in 2017, WPILib will no longer have built-in support for the TalonSRX
# from Cross the Road Electronics (CTRE). Instead, the `CANTalon` class and associated
# functionality is available directly from CTRE as a separate JAR.
#
ctre.download.url=http://www.ctr-electronics.com/downloads/lib/CTRE_FRCLibs_NON-WINDOWS.zip

#
# The navX-MXP library is available in a ZIP file that has only the Java and C++ libraries.
#
navx.download.url=http://www.kauailabs.com/public_files/navx-mxp/navx-mxp-libs.zip