Skip to content

Commit 5c06a9e

Browse files
authored
Upgrade to Gradle 5.2 and Error Prone 2.10.0. (#155)
I would like to be able to support RE2J building under JDK11. Also, we need to move to Sonatype Nexus publishing after the shutdown of JCenter, and that tooling requires a later version of Gradle.
1 parent 49b30f4 commit 5c06a9e

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

build.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'com.jfrog.bintray' version '1.8.1'
66
id 'maven-publish'
77
id 'com.github.sherter.google-java-format' version '0.3.2'
8-
id 'net.ltgt.errorprone' version '0.0.11'
8+
id 'net.ltgt.errorprone' version '2.0.2'
99
id 'idea'
1010

1111
// code coverage support
@@ -25,7 +25,7 @@ cobertura.coverageFormats = ['html', 'xml']
2525
def versionName = '1.6'
2626

2727
wrapper {
28-
gradleVersion '4.9'
28+
gradleVersion '5.2'
2929
}
3030

3131
sourceCompatibility = 1.6
@@ -79,6 +79,9 @@ test {
7979
}
8080

8181
dependencies {
82+
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
83+
errorprone 'com.google.errorprone:error_prone_core:2.10.0'
84+
8285
testCompile 'junit:junit:4.12'
8386
testCompile 'com.google.gwt:gwt-dev:2.9.0'
8487
testCompile 'com.google.gwt:gwt-user:2.9.0'
@@ -88,12 +91,6 @@ dependencies {
8891
testRuntime "org.slf4j:slf4j-api:1.7.10"
8992
}
9093

91-
// Use error_prone_core 2.0.5, later versions require Java 8 to build and we'd
92-
// like to support building on Java 7.
93-
configurations.errorprone {
94-
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.5'
95-
}
96-
9794
task sourceJar(type: Jar) {
9895
baseName 'sources'
9996

gradle/wrapper/gradle-wrapper.jar

861 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

javatests/com/google/re2j/CharClassTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,14 @@ public void testAppendClass() {
160160

161161
@Test
162162
public void testAppendFoldedClass() {
163-
// NB, local variable names use Unicode.
164163
// 0x17F is an old English long s (looks like an f) and folds to s.
165164
// 0x212A is the Kelvin symbol and folds to k.
166-
char ſ = 0x17F, = 0x212A;
165+
char s = 0x17F, k = 0x212A;
167166

168-
assertClass(cc().appendFoldedClass(i('a', 'z')), s("akAK" + + + "lsLS" + ſ + ſ + "tzTZ"));
167+
assertClass(cc().appendFoldedClass(i('a', 'z')), s("akAK" + k + k + "lsLS" + s + s + "tzTZ"));
169168

170169
assertClass(
171-
cc('a', 'f').appendFoldedClass(i('c', 't')), s("akCK" + + + "lsLS" + ſ + ſ + "ttTT"));
170+
cc('a', 'f').appendFoldedClass(i('c', 't')), s("akCK" + k + k + "lsLS" + s + s + "ttTT"));
172171

173172
assertClass(cc('c', 't').appendFoldedClass(i('a', 'f')), 'c', 't', 'a', 'f', 'A', 'F');
174173
}

javatests/com/google/re2j/FindTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ private void testSubmatchBytes(String testName, FindTest.Test test, int n, byte[
482482
for (int k = 0; k < GoTestUtils.len(result); k++) {
483483
if (submatches[k * 2] == -1) {
484484
if (result[k] != null) {
485-
fail(String.format("%s %d: expected null got %s: %s", testName, n, result, test));
485+
fail(
486+
String.format(
487+
"%s %d: expected null got %s: %s", testName, n, Arrays.toString(result), test));
486488
}
487489
continue;
488490
}

0 commit comments

Comments
 (0)