From dd11b930985e0763014c3d2b93ebed7048dedbcf Mon Sep 17 00:00:00 2001 From: WasabiFan Date: Sat, 27 Aug 2016 15:32:11 -0700 Subject: [PATCH 1/2] Port build changes from 2016 robot to fix link errors and other issues --- CompetitionTemplate/.gitignore | 3 ++ .../lib/log4jConfig/deployLogging.xml | 4 +- .../robot-program-build.properties | 18 ++++---- CompetitionTemplate/robot-program-build.xml | 12 ++--- .../subsystems/drive/DriveSubsystem.java | 4 +- CompetitionTemplate/travis-build.properties | 46 +++++++++++++++++++ CompetitionTemplate/travis-build.xml | 6 +++ SeriouslyCommonLib | 2 +- 8 files changed, 75 insertions(+), 20 deletions(-) create mode 100644 CompetitionTemplate/travis-build.properties create mode 100644 CompetitionTemplate/travis-build.xml diff --git a/CompetitionTemplate/.gitignore b/CompetitionTemplate/.gitignore index ae3c172..3859942 100644 --- a/CompetitionTemplate/.gitignore +++ b/CompetitionTemplate/.gitignore @@ -1 +1,4 @@ /bin/ +/TeamDatabase +derby.log +/488Logs \ No newline at end of file diff --git a/CompetitionTemplate/lib/log4jConfig/deployLogging.xml b/CompetitionTemplate/lib/log4jConfig/deployLogging.xml index 4655d3a..177978e 100644 --- a/CompetitionTemplate/lib/log4jConfig/deployLogging.xml +++ b/CompetitionTemplate/lib/log4jConfig/deployLogging.xml @@ -16,12 +16,12 @@ [SendLogConfig] Copying log4j.xml over. - + - + Trying Target: ${target} diff --git a/CompetitionTemplate/robot-program-build.properties b/CompetitionTemplate/robot-program-build.properties index b6409ee..866a90b 100644 --- a/CompetitionTemplate/robot-program-build.properties +++ b/CompetitionTemplate/robot-program-build.properties @@ -6,32 +6,32 @@ simulation.world.file=/usr/share/frcsim/worlds/GearsBotDemo.world version=current # Libraries to use +wpilib=${user.home}/wpilib/java/${version} +wpilib.lib=${wpilib}/lib +wpilib.jar=${wpilib.lib}/WPILib.jar +wpilib.sources=${wpilib.lib}/WPILib-sources.jar +networktables.jar=${wpilib.lib}/NetworkTables.jar +networktables.sources=${wpilib.lib}/NetworkTables-sources.jar + commonlib.root=../SeriouslyCommonLib commonlib.dist=${commonlib.root}/dist commonlib.libs=${commonlib.root}/lib commonlib.jar=${commonlib.dist}/XbotCommonLib.jar -wpilib.jar=${commonlib.libs}/WPILib.jar -wpilib.sources=${commonlib.libs}/WPILib-sources.jar -networktables.jar=${commonlib.libs}/NetworkTables.jar -networktables.sources=${commonlib.libs}/NetworkTables-sources.jar - guice.jar=${commonlib.libs}/guice-3.0/guice-3.0-no_aop.jar guice_assisted.jar=${commonlib.libs}/guice-3.0/guice-assistedinject-3.0.jar inject.jar=${commonlib.libs}/guice-3.0/javax.inject.jar log4j.jar=${commonlib.libs}/log4j/log4j-1.2.17.jar commonsio.jar=${commonlib.libs}/commons-io-2.4/commons-io-2.4.jar -derby.jar=${commonlib.libs}/Derby/derby.jar +derby.jar=${commonlib.libs}/derby/derby.jar junit.jars=${commonlib.libs}/hamcrest-core-1.3.jar:${commonlib.libs}/junit-4.12.jar thirdpartyjars=${guice.jar}:${guice_assisted.jar}:${inject.jar}:${derby.jar}:${log4j.jar}:${commonsio.jar} classpath=${wpilib.jar}:${networktables.jar}:${thirdpartyjars}:${commonlib.jar} -wpilib.ant.dir=${commonlib.libs}/ant - # Build information -jar=RobotProgram.jar +jar=FRCUserProgram.jar src.dir=src test.dir=tests test.src.dir=tests diff --git a/CompetitionTemplate/robot-program-build.xml b/CompetitionTemplate/robot-program-build.xml index 61601ef..0e1b3ab 100644 --- a/CompetitionTemplate/robot-program-build.xml +++ b/CompetitionTemplate/robot-program-build.xml @@ -1,6 +1,6 @@ - + @@ -19,10 +19,10 @@ - - - - + + + + @@ -42,7 +42,7 @@ - + diff --git a/CompetitionTemplate/src/competition/subsystems/drive/DriveSubsystem.java b/CompetitionTemplate/src/competition/subsystems/drive/DriveSubsystem.java index 357eb87..c72a9da 100644 --- a/CompetitionTemplate/src/competition/subsystems/drive/DriveSubsystem.java +++ b/CompetitionTemplate/src/competition/subsystems/drive/DriveSubsystem.java @@ -8,7 +8,7 @@ import xbot.common.command.BaseSubsystem; import xbot.common.controls.actuators.XSpeedController; import xbot.common.injection.wpi_factories.WPIFactory; -import xbot.common.properties.PropertyManager; +import xbot.common.properties.XPropertyManager; @Singleton public class DriveSubsystem extends BaseSubsystem { @@ -20,7 +20,7 @@ public class DriveSubsystem extends BaseSubsystem { public final XSpeedController rightRearDrive; @Inject - public DriveSubsystem(WPIFactory factory, PropertyManager propManager) { + public DriveSubsystem(WPIFactory factory, XPropertyManager propManager) { log.info("Creating DriveSubsystem"); this.leftFrontDrive = factory.getSpeedController(0); diff --git a/CompetitionTemplate/travis-build.properties b/CompetitionTemplate/travis-build.properties new file mode 100644 index 0000000..8a20fae --- /dev/null +++ b/CompetitionTemplate/travis-build.properties @@ -0,0 +1,46 @@ +# Project specific information +package=competition +robot.class=${package}.Robot + +version=current + +# Libraries to use +commonlib.root=../SeriouslyCommonLib +commonlib.dist=${commonlib.root}/dist +commonlib.libs=${commonlib.root}/lib +commonlib.jar=${commonlib.dist}/XbotCommonLib.jar + +wpilib.jar=${commonlib.libs}/WPILib.jar +wpilib.sources=${commonlib.libs}/WPILib-sources.jar +networktables.jar=${commonlib.libs}/NetworkTables.jar +networktables.sources=${commonlib.libs}/NetworkTables-sources.jar + +guice.jar=${commonlib.libs}/guice-3.0/guice-3.0-no_aop.jar +guice_assisted.jar=${commonlib.libs}/guice-3.0/guice-assistedinject-3.0.jar +inject.jar=${commonlib.libs}/guice-3.0/javax.inject.jar +log4j.jar=${commonlib.libs}/log4j/log4j-1.2.17.jar +commonsio.jar=${commonlib.libs}/commons-io-2.4/commons-io-2.4.jar +derby.jar=${commonlib.libs}/Derby/derby.jar +junit.jars=${commonlib.libs}/hamcrest-core-1.3.jar:${commonlib.libs}/junit-4.12.jar + +thirdpartyjars=${guice.jar}:${guice_assisted.jar}:${inject.jar}:${derby.jar}:${log4j.jar}:${commonsio.jar} + +classpath=${wpilib.jar}:${networktables.jar}:${thirdpartyjars}:${commonlib.jar} + +wpilib.ant.dir=${commonlib.libs}/ant + +# Build information +jar=FRCUserProgram.jar +src.dir=src +test.dir=tests +test.src.dir=tests +test.dest.dir=dist/tests +build.dir=build +build.jars=${build.dir}/jars +test.report.dir=${build.dir}/test-reports +dist.dir=dist +dist.jar=${dist.dir}/${jar} + + +test.classpath=${classpath}:${junit.jars}:${dist.jar} +test.magic.classpath=${test.classpath}:${test.dest.dir} \ No newline at end of file diff --git a/CompetitionTemplate/travis-build.xml b/CompetitionTemplate/travis-build.xml new file mode 100644 index 0000000..9e23e57 --- /dev/null +++ b/CompetitionTemplate/travis-build.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/SeriouslyCommonLib b/SeriouslyCommonLib index af557ae..2755598 160000 --- a/SeriouslyCommonLib +++ b/SeriouslyCommonLib @@ -1 +1 @@ -Subproject commit af557ae4d30e8daf441cad21f3a37eba389a0dc5 +Subproject commit 27555984549de6eeb78cb14b58077df0c8cb1d5e From 5611f1d0e5749823b0ca005ed31ad6e441ba64f9 Mon Sep 17 00:00:00 2001 From: WasabiFan Date: Wed, 31 Aug 2016 12:25:38 -0700 Subject: [PATCH 2/2] Point travis at correct ant file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8245e0a..c801419 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,4 @@ jdk: - oraclejdk8 script: - cd CompetitionTemplate - - ant check -f robot-program-build.xml \ No newline at end of file + - ant check -f travis-build.xml \ No newline at end of file