diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 63c4bae0aa..fac0546acd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,7 +17,7 @@ jobs: pool: vmImage: 'Ubuntu 16.04' - container: wpilib2018 + container: wpilib2019 steps: - task: Gradle@2 diff --git a/build.gradle b/build.gradle index 6a2934da9a..6e88e56cf4 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,7 @@ plugins { id 'edu.wpi.first.GradleVsCode' version '0.4.2' id 'idea' id 'com.gradle.build-scan' version '1.15.1' - id 'net.ltgt.errorprone' version '0.0.15' apply false // For Java 8 - id 'net.ltgt.errorprone-javacplugin' version '0.3' apply false // For Java 9+ + id 'net.ltgt.errorprone' version '0.6' apply false } repositories { diff --git a/ntcore/src/test/java/edu/wpi/first/networktables/ConnectionListenerTest.java b/ntcore/src/test/java/edu/wpi/first/networktables/ConnectionListenerTest.java index 333948e204..7035146b2b 100644 --- a/ntcore/src/test/java/edu/wpi/first/networktables/ConnectionListenerTest.java +++ b/ntcore/src/test/java/edu/wpi/first/networktables/ConnectionListenerTest.java @@ -19,6 +19,7 @@ import org.junit.jupiter.api.condition.OS; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotSame; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -65,9 +66,9 @@ class ConnectionListenerTest { void testJNI() { // set up the poller int poller = NetworkTablesJNI.createConnectionListenerPoller(m_serverInst.getHandle()); - assertTrue(poller != 0, "bad poller handle"); + assertNotSame(poller, 0, "bad poller handle"); int handle = NetworkTablesJNI.addPolledConnectionListener(poller, false); - assertTrue(handle != 0, "bad listener handle"); + assertNotSame(handle, 0, "bad listener handle"); // trigger a connect event connect(); diff --git a/shared/config.gradle b/shared/config.gradle index a46d44a12a..5f4a8cf31d 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -104,7 +104,7 @@ if (!project.hasProperty('skipAthena')) { roboRio(CrossBuildConfig) { architecture = 'athena' operatingSystem = 'linux' - toolChainPrefix = 'arm-frc-linux-gnueabi-' + toolChainPrefix = 'arm-frc2019-linux-gnueabi-' compilerArgs = linuxCompilerArgs CCompilerArgs = linuxCCompilerArgs linkerArgs = linuxLinkerArgs diff --git a/shared/java/javacommon.gradle b/shared/java/javacommon.gradle index 6efc975e2f..1830e4d101 100644 --- a/shared/java/javacommon.gradle +++ b/shared/java/javacommon.gradle @@ -1,11 +1,6 @@ apply plugin: 'maven-publish' apply plugin: 'java' - -if (JavaVersion.current() == JavaVersion.VERSION_1_8) { - apply plugin: 'net.ltgt.errorprone' -} else { - apply plugin: 'net.ltgt.errorprone-javacplugin' -} +//apply plugin: 'net.ltgt.errorprone' def pubVersion if (project.hasProperty("publishVersion")) { @@ -98,6 +93,7 @@ if (project.hasProperty('onlyAthena')) { repositories { mavenCentral() + //maven.url "https://oss.sonatype.org/content/repositories/snapshots/" } sourceSets { @@ -116,7 +112,8 @@ dependencies { devCompile sourceSets.main.output - errorprone 'com.google.errorprone:error_prone_core:2.3.1' + //errorprone 'com.google.errorprone:error_prone_core:2.3.2-SNAPSHOT' + //errorproneJavac 'com.google.errorprone:error_prone_core:2.3.1' } task run(type: JavaExec) { diff --git a/shared/java/javastyle.gradle b/shared/java/javastyle.gradle index 63be640a30..e0919883a5 100644 --- a/shared/java/javastyle.gradle +++ b/shared/java/javastyle.gradle @@ -3,12 +3,13 @@ apply plugin: 'checkstyle' apply plugin: 'pmd' checkstyle { - toolVersion = "8.10" - configFile = new File(rootDir, "styleguide/checkstyle.xml") + toolVersion = "8.12" + configDir = file("${project.rootDir}/styleguide") + config = resources.text.fromFile(new File(configDir, "checkstyle.xml")) } pmd { - toolVersion = '6.3.0' + toolVersion = '6.7.0' consoleOutput = true reportsDir = file("$project.buildDir/reports/pmd") ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml")) diff --git a/shared/nilibraries.gradle b/shared/nilibraries.gradle index 99b285a685..5836a67a16 100644 --- a/shared/nilibraries.gradle +++ b/shared/nilibraries.gradle @@ -16,7 +16,7 @@ model { artifactId = 'chipobject' headerClassifier = 'headers' ext = 'zip' - version = '2018.17.1' + version = '2019.4.1' sharedConfigs = chipObjectConfigs staticConfigs = [:] compileOnlyShared = true @@ -26,7 +26,7 @@ model { artifactId = 'netcomm' headerClassifier = 'headers' ext = 'zip' - version = '2018.17.1' + version = '2019.4.1' sharedConfigs = netCommLibConfigs staticConfigs = [:] compileOnlyShared = true diff --git a/styleguide/checkstyle.xml b/styleguide/checkstyle.xml index 346eed324c..0a690b6842 100644 --- a/styleguide/checkstyle.xml +++ b/styleguide/checkstyle.xml @@ -20,7 +20,7 @@ module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" value="error" /> + value="${config_loc}/suppressions.xml" /> diff --git a/styleguide/pmd-ruleset.xml b/styleguide/pmd-ruleset.xml index d63d3d2d49..50f7cc7195 100644 --- a/styleguide/pmd-ruleset.xml +++ b/styleguide/pmd-ruleset.xml @@ -50,6 +50,8 @@ + + diff --git a/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/ConditionalCommandTest.java b/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/ConditionalCommandTest.java index 6147974eff..5f3285c0dd 100644 --- a/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/ConditionalCommandTest.java +++ b/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/ConditionalCommandTest.java @@ -11,6 +11,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertTrue; class ConditionalCommandTest extends AbstractCommandTest { @@ -75,7 +76,7 @@ class ConditionalCommandTest extends AbstractCommandTest { assertConditionalCommandState(m_command, 1, 5, 5, 1, 0); assertTrue(m_onTrue.getInitializeCount() > 0, "Did not initialize the true command"); - assertTrue(m_onFalse.getInitializeCount() == 0, "Initialized the false command"); + assertSame(m_onFalse.getInitializeCount(), 0, "Initialized the false command"); } @Test @@ -113,7 +114,7 @@ class ConditionalCommandTest extends AbstractCommandTest { assertConditionalCommandState(m_command, 1, 5, 5, 1, 0); assertTrue(m_onFalse.getInitializeCount() > 0, "Did not initialize the false command"); - assertTrue(m_onTrue.getInitializeCount() == 0, "Initialized the true command"); + assertSame(m_onTrue.getInitializeCount(), 0, "Initialized the true command"); } @Test