diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1f3ca8..074c4a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: # TODO Add 13 once Gradle 6.0 is out - java_version: [1.8, 9, 10, 11, 12] + java_version: [1.8,10,11,12,13] steps: - name: Checkout uses: actions/checkout@v1 diff --git a/gradle.properties b/gradle.properties index 7b69975..5139c92 100755 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ # limitations under the License. # GROUP=com.uber.rxdogtag -VERSION_NAME=0.4.0-SNAPSHOT +VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=Automatic tagging of RxJava 2 originating subscribe points for onError() investigation. POM_URL=https://github.com/uber/RxDogTag/ POM_SCM_URL=https://github.com/uber/RxDogTag/ diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 1c40c01..6ae07c7 100755 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -16,7 +16,7 @@ def versions = [ animalSniffer: '1.5.0', - androidBenchmark: '1.0.0-alpha06', + androidBenchmark: '1.0.0', errorProne: '2.3.3', errorPronePlugin: '0.7.1', gjf: '1.7', @@ -24,7 +24,7 @@ def versions = [ jmhPlugin: '0.4.8', nullawayPlugin: '0.1', dokka: '0.9.18', - spotless: '3.24.2' + spotless: '3.27.2' ] def build = [ @@ -35,18 +35,18 @@ def build = [ errorProneJavac: "com.google.errorprone:javac:9+181-r4173-1", errorProneCheckApi: "com.google.errorprone:error_prone_check_api:${versions.errorProne}", errorProneTestHelpers: "com.google.errorprone:error_prone_test_helpers:${versions.errorProne}", - nullAway: 'com.uber.nullaway:nullaway:0.7.0', + nullAway: 'com.uber.nullaway:nullaway:0.7.9', animalSniffer: 'org.codehaus.mojo.signature:java17:1.0@signature' ] def rx = [ - autodispose: 'com.uber.autodispose:autodispose:1.2.0', - java: 'io.reactivex.rxjava2:rxjava:2.2.2' + autodispose: 'com.uber.autodispose:autodispose:1.4.0', + java: 'io.reactivex.rxjava2:rxjava:2.2.18' ] def test = [ junit: 'junit:junit:4.12', - truth: 'com.google.truth:truth:0.43' + truth: 'com.google.truth:truth:1.0.1' ] ext.deps = [ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf..f3d88b1 100755 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8d58bda..84a9066 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 83f2acf..2fe81a7 100755 --- a/gradlew +++ b/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +175,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 24467a1..9109989 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" diff --git a/mkdocs.yml b/mkdocs.yml index 4f6ae20..108d5f1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -37,9 +37,9 @@ markdown_extensions: nav: - 'Overview': index.md - - '0.X API': - - 'rxdogtag': 0.x/rxdogtag/com.uber.rxdogtag/ - - 'rxdogtag-autodispose': 0.x/rxdogtag-autodispose/com.uber.rxdogtag.autodispose/ + - '1.X API': + - 'rxdogtag': 1.x/rxdogtag/com.uber.rxdogtag/ + - 'rxdogtag-autodispose': 1.x/rxdogtag-autodispose/com.uber.rxdogtag.autodispose/ - 'Benchmark': benchmark.md - 'Examples': examples.md - 'Under The Hood': under-the-hood.md diff --git a/rxdogtag-autodispose/build.gradle b/rxdogtag-autodispose/build.gradle index 4e5e88c..87d5f8f 100755 --- a/rxdogtag-autodispose/build.gradle +++ b/rxdogtag-autodispose/build.gradle @@ -37,7 +37,7 @@ dokka { // Output as Github flavored markdown so that docs show up inline in mkdocs website outputFormat = 'gfm' - outputDirectory = "$rootDir/docs/0.x" + outputDirectory = "$rootDir/docs/1.x" classpath = new ArrayList(project.tasks['assemble'].outputs.files.files) sourceDirs = files('src/main/java') } diff --git a/rxdogtag/build.gradle b/rxdogtag/build.gradle index 574920c..c837f23 100755 --- a/rxdogtag/build.gradle +++ b/rxdogtag/build.gradle @@ -35,7 +35,7 @@ dokka { // Output as Github flavored markdown so that docs show up inline in mkdocs website outputFormat = 'gfm' - outputDirectory = "$rootDir/docs/0.x" + outputDirectory = "$rootDir/docs/1.x" classpath = new ArrayList(project.tasks['assemble'].outputs.files.files) sourceDirs = files('src/main/java') } diff --git a/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverDelegatesTest.java b/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverDelegatesTest.java index 028273d..b54be63 100644 --- a/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverDelegatesTest.java +++ b/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverDelegatesTest.java @@ -333,7 +333,7 @@ private void assertTaggedError( assertUnwrappedError(recordedThrowable, lineNumber, originalError, delegateType); // Make sure we've restored the original handler - assertThat(Thread.currentThread().getUncaughtExceptionHandler()).isSameAs(handler); + assertThat(Thread.currentThread().getUncaughtExceptionHandler()).isSameInstanceAs(handler); } private Thread.UncaughtExceptionHandler prepareTest() { diff --git a/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverTest.java b/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverTest.java index 5244049..63e501a 100644 --- a/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverTest.java +++ b/rxdogtag/src/test/java/com/uber/anotherpackage/DogTagObserverTest.java @@ -211,7 +211,7 @@ public void onComplete() {} Exception original = new RuntimeException("Blah"); Observable.error(original).subscribe(o); Throwable recorded = recordedError.get(); - assertThat(recorded).isSameAs(original); + assertThat(recorded).isSameInstanceAs(original); } @Test @@ -238,7 +238,7 @@ public void onComplete() {} Exception original = new RuntimeException("Blah"); Observable.error(original).subscribe(o); Throwable recorded = recordedError.get(); - assertThat(recorded).isSameAs(original); + assertThat(recorded).isSameInstanceAs(original); } @Test @@ -278,9 +278,9 @@ public void onComplete() {} fail("thrown was null! This means the observer's onError was never called"); return; } - assertThat(thrown).hasCauseThat().isSameAs(original); + assertThat(thrown).hasCauseThat().isSameInstanceAs(original); assertThat(recorded).isInstanceOf(OnErrorNotImplementedException.class); - assertThat(recorded).hasCauseThat().isSameAs(thrown); + assertThat(recorded).hasCauseThat().isSameInstanceAs(thrown); // The original cause was put in this assertThat(recorded).hasMessageThat().contains("java.lang.RuntimeException: Blah"); diff --git a/rxdogtag/src/test/java/com/uber/anotherpackage/ObserverHandlerDefaultsTest.java b/rxdogtag/src/test/java/com/uber/anotherpackage/ObserverHandlerDefaultsTest.java index 6974ec7..6a14686 100644 --- a/rxdogtag/src/test/java/com/uber/anotherpackage/ObserverHandlerDefaultsTest.java +++ b/rxdogtag/src/test/java/com/uber/anotherpackage/ObserverHandlerDefaultsTest.java @@ -38,11 +38,11 @@ public void defaultsShouldReturnSameObserver() { TestObserver o = new TestObserver<>(); TestSubscriber s = new TestSubscriber<>(); - assertThat(handler.handle(Flowable.never(), s)).isSameAs(s); - assertThat(handler.handle(Observable.never(), o)).isSameAs(o); - assertThat(handler.handle(Maybe.never(), o)).isSameAs(o); - assertThat(handler.handle(Single.never(), o)).isSameAs(o); - assertThat(handler.handle(Completable.never(), o)).isSameAs(o); + assertThat(handler.handle(Flowable.never(), s)).isSameInstanceAs(s); + assertThat(handler.handle(Observable.never(), o)).isSameInstanceAs(o); + assertThat(handler.handle(Maybe.never(), o)).isSameInstanceAs(o); + assertThat(handler.handle(Single.never(), o)).isSameInstanceAs(o); + assertThat(handler.handle(Completable.never(), o)).isSameInstanceAs(o); } /** diff --git a/rxdogtag/src/test/java/com/uber/anotherpackage/RxDogTagConfigurationTest.java b/rxdogtag/src/test/java/com/uber/anotherpackage/RxDogTagConfigurationTest.java index 74ecade..89ee5fd 100644 --- a/rxdogtag/src/test/java/com/uber/anotherpackage/RxDogTagConfigurationTest.java +++ b/rxdogtag/src/test/java/com/uber/anotherpackage/RxDogTagConfigurationTest.java @@ -115,7 +115,7 @@ public void onComplete() {} assertThat(e).isInstanceOf(OnErrorNotImplementedException.class); assertThat(e.getStackTrace()).isEmpty(); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()).contains(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); } @@ -138,7 +138,7 @@ public Observer handle(Observable observable, Observer observer) { assertThat(e).isInstanceOf(OnErrorNotImplementedException.class); assertThat(e.getStackTrace()).isEmpty(); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()).contains(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); } @@ -154,7 +154,7 @@ public void customPackages() { assertThat(e).isInstanceOf(OnErrorNotImplementedException.class); assertThat(e.getStackTrace()).isEmpty(); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()).contains(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); // Confirm that we ignored the subscribe line in this test because of the matching package. @@ -171,7 +171,7 @@ public void disableAnnotations() { assertThat(e).isInstanceOf(OnErrorNotImplementedException.class); assertThat(e.getStackTrace()).isEmpty(); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()) .doesNotContain(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); } @@ -190,7 +190,7 @@ public void repackagingOENIEs_onByDefault() { assertThat(e.getStackTrace()).isEmpty(); assertThat(e).hasMessageThat().isEqualTo(expected.getMessage()); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()).contains(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); } @@ -205,11 +205,11 @@ public void repackagingOENIEs_disabled() { // Assert it's the original, untouched exception assertThat(e).isInstanceOf(OnErrorNotImplementedException.class); - assertThat(e).isSameAs(parent); + assertThat(e).isSameInstanceAs(parent); assertThat(e.getStackTrace()).isEqualTo(parent.getStackTrace()); assertThat(e).hasMessageThat().isEqualTo(parent.getMessage()); Throwable cause = e.getCause(); - assertThat(cause).isSameAs(expected); + assertThat(cause).isSameInstanceAs(expected); assertThat(cause.getStackTrace()[1].toString()).contains(RxDogTag.STACK_ELEMENT_SOURCE_HEADER); }