Update to 2019 RoboRIO and 2019 v4 image (#1352)

Also make updates for Java 11:
* Disable errorprone plugin (currently broken on Java 11)
* Update checkstyle to 8.12
* Update pmd to 6.7.0
This commit is contained in:
Thad House
2018-10-07 18:11:57 -07:00
committed by Peter Johnson
parent 88b93c220e
commit b9fa3a4398
10 changed files with 22 additions and 21 deletions

View File

@@ -17,7 +17,7 @@ jobs:
pool:
vmImage: 'Ubuntu 16.04'
container: wpilib2018
container: wpilib2019
steps:
- task: Gradle@2

View File

@@ -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 {

View File

@@ -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();

View File

@@ -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

View File

@@ -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) {

View File

@@ -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"))

View File

@@ -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

View File

@@ -20,7 +20,7 @@ module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
value="error" />
<module name="SuppressionFilter">
<property name="file"
value="styleguide/suppressions.xml" />
value="${config_loc}/suppressions.xml" />
</module>
<property name="fileExtensions"
value="java, properties, xml" />

View File

@@ -50,6 +50,8 @@
<exclude name="DataflowAnomalyAnalysis" />
<exclude name="DoNotCallSystemExit" />
<exclude name="FinalizeDoesNotCallSuperFinalize" />
<exclude name="JUnitSpelling" />
<exclude name="MissingSerialVersionUID" />
<exclude name="NullAssignment" />
</rule>

View File

@@ -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