diff --git a/.travis.yml b/.travis.yml index aaa37d12..36fb2af1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ language: android android: components: - - build-tools-27.0.3 - - android-27 + - build-tools-29.0.2 + - android-29 script: - ./gradlew check jacoco assemble - bash <(curl -s https://codecov.io/bash) diff --git a/app/build.gradle b/app/build.gradle index 1487398c..6fbf9fa4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -40,18 +40,16 @@ android { } } -project.ext.glideVersion = '4.7.1' - dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':library') - implementation "com.android.support:appcompat-v7:${rootProject.supportLibVersion}" - implementation "com.android.support:design:${rootProject.supportLibVersion}" - implementation "com.github.bumptech.glide:glide:${project.glideVersion}" + implementation "androidx.appcompat:appcompat:1.1.0" + implementation 'androidx.annotation:annotation:1.1.0' + implementation "com.google.android.material:material:1.0.0" + implementation "com.github.bumptech.glide:glide:4.10.0" implementation 'com.squareup.okio:okio:1.14.1' implementation 'joda-time:joda-time:2.10' - annotationProcessor "com.github.bumptech.glide:compiler:${project.glideVersion}" + annotationProcessor "com.github.bumptech.glide:compiler:4.10.0" } apply from: '../config/style.gradle' diff --git a/app/java/net/openid/appauthdemo/Application.java b/app/java/net/openid/appauthdemo/Application.java index cc76cc37..e97d633c 100644 --- a/app/java/net/openid/appauthdemo/Application.java +++ b/app/java/net/openid/appauthdemo/Application.java @@ -14,7 +14,7 @@ package net.openid.appauthdemo; -import android.support.v7.app.AppCompatDelegate; +import androidx.appcompat.app.AppCompatDelegate; /** * Application object; ensures that the support library is correctly configured for use of diff --git a/app/java/net/openid/appauthdemo/AuthStateManager.java b/app/java/net/openid/appauthdemo/AuthStateManager.java index 2718211c..21693966 100644 --- a/app/java/net/openid/appauthdemo/AuthStateManager.java +++ b/app/java/net/openid/appauthdemo/AuthStateManager.java @@ -16,11 +16,12 @@ import android.content.Context; import android.content.SharedPreferences; -import android.support.annotation.AnyThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.AnyThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.openid.appauth.AuthState; import net.openid.appauth.AuthorizationException; import net.openid.appauth.AuthorizationResponse; diff --git a/app/java/net/openid/appauthdemo/BrowserSelectionAdapter.java b/app/java/net/openid/appauthdemo/BrowserSelectionAdapter.java index 2b68c82d..b1708590 100644 --- a/app/java/net/openid/appauthdemo/BrowserSelectionAdapter.java +++ b/app/java/net/openid/appauthdemo/BrowserSelectionAdapter.java @@ -24,7 +24,6 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -32,6 +31,8 @@ import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; + import net.openid.appauth.browser.BrowserDescriptor; import net.openid.appauth.browser.BrowserSelector; diff --git a/app/java/net/openid/appauthdemo/Configuration.java b/app/java/net/openid/appauthdemo/Configuration.java index 0be12e09..ee97d27e 100644 --- a/app/java/net/openid/appauthdemo/Configuration.java +++ b/app/java/net/openid/appauthdemo/Configuration.java @@ -19,10 +19,11 @@ import android.content.SharedPreferences; import android.content.res.Resources; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.openid.appauth.connectivity.ConnectionBuilder; import net.openid.appauth.connectivity.DefaultConnectionBuilder; @@ -37,6 +38,7 @@ import java.lang.ref.WeakReference; import java.nio.charset.Charset; + /** * Reads and validates the demo app configuration from `res/raw/auth_config.json`. Configuration * changes are detected by comparing the hash of the last known configuration to the read diff --git a/app/java/net/openid/appauthdemo/ConnectionBuilderForTesting.java b/app/java/net/openid/appauthdemo/ConnectionBuilderForTesting.java index 6f0470ff..c61c6a85 100644 --- a/app/java/net/openid/appauthdemo/ConnectionBuilderForTesting.java +++ b/app/java/net/openid/appauthdemo/ConnectionBuilderForTesting.java @@ -16,10 +16,11 @@ import android.annotation.SuppressLint; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.openid.appauth.Preconditions; import net.openid.appauth.connectivity.ConnectionBuilder; diff --git a/app/java/net/openid/appauthdemo/LoginActivity.java b/app/java/net/openid/appauthdemo/LoginActivity.java index 02e0371d..bacf2a41 100644 --- a/app/java/net/openid/appauthdemo/LoginActivity.java +++ b/app/java/net/openid/appauthdemo/LoginActivity.java @@ -21,15 +21,6 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.annotation.AnyThread; -import android.support.annotation.ColorRes; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; -import android.support.customtabs.CustomTabsIntent; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -42,6 +33,17 @@ import android.widget.Spinner; import android.widget.TextView; +import androidx.annotation.AnyThread; +import androidx.annotation.ColorRes; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; +import androidx.appcompat.app.AppCompatActivity; +import androidx.browser.customtabs.CustomTabsIntent; + +import com.google.android.material.snackbar.Snackbar; + import net.openid.appauth.AppAuthConfiguration; import net.openid.appauth.AuthState; import net.openid.appauth.AuthorizationException; @@ -171,6 +173,7 @@ protected void onDestroy() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); displayAuthOptions(); if (resultCode == RESULT_CANCELED) { displayAuthCancelled(); diff --git a/app/java/net/openid/appauthdemo/TokenActivity.java b/app/java/net/openid/appauthdemo/TokenActivity.java index 74f27b79..3e0cccd6 100644 --- a/app/java/net/openid/appauthdemo/TokenActivity.java +++ b/app/java/net/openid/appauthdemo/TokenActivity.java @@ -17,11 +17,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.MainThread; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; @@ -29,6 +24,13 @@ import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.MainThread; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; +import androidx.appcompat.app.AppCompatActivity; + +import com.google.android.material.snackbar.Snackbar; + import net.openid.appauth.AppAuthConfiguration; import net.openid.appauth.AuthState; import net.openid.appauth.AuthorizationException; @@ -54,6 +56,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicReference; + /** * Displays the authorized state of the user. This activity is provided with the outcome of the * authorization flow, which it uses to negotiate the final authorized state, diff --git a/app/res/layout/activity_login.xml b/app/res/layout/activity_login.xml index 5f14e203..ffa20908 100644 --- a/app/res/layout/activity_login.xml +++ b/app/res/layout/activity_login.xml @@ -1,5 +1,5 @@ - - @@ -86,19 +86,19 @@ android:layout_marginTop="16dp" style="@style/Base.TextAppearance.AppCompat.Subhead" /> - - - + - - + + diff --git a/app/res/layout/activity_token.xml b/app/res/layout/activity_token.xml index ceaff2d6..847faa61 100644 --- a/app/res/layout/activity_token.xml +++ b/app/res/layout/activity_token.xml @@ -1,5 +1,5 @@ - - + diff --git a/build.gradle b/build.gradle index a454d9ce..b83eda4d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,9 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'org.ajoberstar:gradle-git:1.7.2' } } @@ -40,9 +40,8 @@ try { } project.ext.minSdkVersion = 16 -project.ext.compileSdkVersion = 27 -project.ext.buildToolsVersion = '27.0.3' -project.ext.supportLibVersion = '27.1.1' +project.ext.compileSdkVersion = 29 +project.ext.buildToolsVersion = '29.0.2' task showVersion { doLast { diff --git a/config/coverage.gradle b/config/coverage.gradle index 17334464..2b29c48a 100644 --- a/config/coverage.gradle +++ b/config/coverage.gradle @@ -21,10 +21,12 @@ task jacocoTestReport(type: JacocoReport, dependsOn: "testDebugUnitTest") { html.enabled = true } // Class R is used, but usage will not be covered, so ignore this class from report - classDirectories = fileTree( - dir: 'build/intermediates/classes/debug', - excludes: ['**/BuildConfig.class'] - ) - sourceDirectories = files('java') - executionData = files('build/jacoco/testDebugUnitTest.exec') + afterEvaluate { + classDirectories = fileTree( + dir: 'build/intermediates/classes/debug', + excludes: ['**/BuildConfig.class'] + ) + sourceDirectories = files('java') + executionData = files('build/jacoco/testDebugUnitTest.exec') + } } diff --git a/config/javadoc.gradle b/config/javadoc.gradle index f55c4ca3..d28c8292 100644 --- a/config/javadoc.gradle +++ b/config/javadoc.gradle @@ -7,20 +7,22 @@ dependencies { } task androidJavadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - title = "AppAuth for Android" - classpath += files(project.android.getBootClasspath()) - options { - doclet "org.jdrupes.mdoclet.MDoclet" - docletpath(*configurations.mdDoclet.files.asType(List)) - links "http://docs.oracle.com/javase/7/docs/api/" - linksOffline "http://d.android.com/reference","${android.sdkDirectory}/docs/reference" + afterEvaluate { + source = android.sourceSets.main.java.srcDirs + title = "AppAuth for Android" + classpath += files(project.android.getBootClasspath()) + options { + doclet "org.jdrupes.mdoclet.MDoclet" + docletpath(*configurations.mdDoclet.files.asType(List)) + links "http://docs.oracle.com/javase/7/docs/api/" + linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference" + } + exclude '**/BuildConfig.java' + exclude '**/R.java' } - exclude '**/BuildConfig.java' - exclude '**/R.java' } -task javadocJar(type: Jar, dependsOn:androidJavadoc) { +task javadocJar(type: Jar, dependsOn: androidJavadoc) { classifier = 'javadoc' from androidJavadoc.destinationDir } @@ -28,6 +30,6 @@ task javadocJar(type: Jar, dependsOn:androidJavadoc) { afterEvaluate { // fixes issue where javadoc can't find android symbols ref: http://stackoverflow.com/a/34572606 androidJavadoc.classpath += files(android.libraryVariants.collect { variant -> - variant.javaCompile.classpath.files + variant.javaCompileProvider.get().classpath.files }) } diff --git a/config/style.gradle b/config/style.gradle index 7ee3fd6c..c4013ef0 100644 --- a/config/style.gradle +++ b/config/style.gradle @@ -7,9 +7,11 @@ checkstyle { } task checkAllSource(type: Checkstyle) { - source 'java' - include '**/*.java' - classpath = files project.configurations.compile.files + afterEvaluate { + source 'java' + include '**/*.java' + classpath = files project.configurations.compile.files + } } task failOnCheckstyleWarning { diff --git a/gradle.properties b/gradle.properties index 1a644c77..7f4668fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,3 @@ +android.enableJetifier=true +android.useAndroidX=true org.gradle.daemon=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d232b56c..cc4fdc29 100644 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 b65735cd..ee69dd68 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Apr 06 13:27:13 PDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip diff --git a/gradlew b/gradlew index 4453ccea..2fe81a7d 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,16 +44,16 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` @@ -138,35 +154,30 @@ if $cygwin ; 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 # Escape application args -save ( ) { +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 e95643d6..9618d8d9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,84 +1,100 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@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= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@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" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/library/build.gradle b/library/build.gradle index 10f965ee..e5f06cc8 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -23,7 +23,8 @@ android.buildTypes { android.testBuildType "forTests" dependencies { - api "com.android.support:customtabs:${rootProject.supportLibVersion}" + api "androidx.browser:browser:1.0.0" + implementation 'androidx.annotation:annotation:1.1.0' apply from: '../config/testdeps.gradle', to:it } diff --git a/library/java/net/openid/appauth/AdditionalParamsProcessor.java b/library/java/net/openid/appauth/AdditionalParamsProcessor.java index 6b8a631b..566d3fd2 100644 --- a/library/java/net/openid/appauth/AdditionalParamsProcessor.java +++ b/library/java/net/openid/appauth/AdditionalParamsProcessor.java @@ -18,8 +18,8 @@ import static net.openid.appauth.Preconditions.checkNotNull; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/AppAuthConfiguration.java b/library/java/net/openid/appauth/AppAuthConfiguration.java index d86fb0ab..a0255cfc 100644 --- a/library/java/net/openid/appauth/AppAuthConfiguration.java +++ b/library/java/net/openid/appauth/AppAuthConfiguration.java @@ -14,7 +14,7 @@ package net.openid.appauth; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.openid.appauth.browser.AnyBrowserMatcher; import net.openid.appauth.browser.BrowserMatcher; diff --git a/library/java/net/openid/appauth/AsciiStringListUtil.java b/library/java/net/openid/appauth/AsciiStringListUtil.java index 9631f6be..967c28c5 100644 --- a/library/java/net/openid/appauth/AsciiStringListUtil.java +++ b/library/java/net/openid/appauth/AsciiStringListUtil.java @@ -16,9 +16,10 @@ import static net.openid.appauth.Preconditions.checkArgument; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.Nullable; + import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/library/java/net/openid/appauth/AuthState.java b/library/java/net/openid/appauth/AuthState.java index 1de1be52..ae08e3d3 100644 --- a/library/java/net/openid/appauth/AuthState.java +++ b/library/java/net/openid/appauth/AuthState.java @@ -19,9 +19,9 @@ import static net.openid.appauth.Preconditions.checkNotEmpty; import static net.openid.appauth.Preconditions.checkNotNull; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import net.openid.appauth.internal.Logger; diff --git a/library/java/net/openid/appauth/AuthorizationException.java b/library/java/net/openid/appauth/AuthorizationException.java index 77738e33..e2057ce7 100644 --- a/library/java/net/openid/appauth/AuthorizationException.java +++ b/library/java/net/openid/appauth/AuthorizationException.java @@ -19,10 +19,10 @@ import android.content.Intent; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.v4.util.ArrayMap; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.collection.ArrayMap; import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/AuthorizationManagementActivity.java b/library/java/net/openid/appauth/AuthorizationManagementActivity.java index 3eddac43..a1bcd1c9 100644 --- a/library/java/net/openid/appauth/AuthorizationManagementActivity.java +++ b/library/java/net/openid/appauth/AuthorizationManagementActivity.java @@ -21,7 +21,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import net.openid.appauth.AuthorizationException.AuthorizationRequestErrors; import net.openid.appauth.internal.Logger; diff --git a/library/java/net/openid/appauth/AuthorizationRequest.java b/library/java/net/openid/appauth/AuthorizationRequest.java index 0f133eb8..3ed5f315 100644 --- a/library/java/net/openid/appauth/AuthorizationRequest.java +++ b/library/java/net/openid/appauth/AuthorizationRequest.java @@ -22,12 +22,13 @@ import static net.openid.appauth.Preconditions.checkNullOrNotEmpty; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.TextUtils; import android.util.Base64; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import net.openid.appauth.internal.UriUtil; import org.json.JSONException; diff --git a/library/java/net/openid/appauth/AuthorizationResponse.java b/library/java/net/openid/appauth/AuthorizationResponse.java index 84aa6bd0..cae009cd 100644 --- a/library/java/net/openid/appauth/AuthorizationResponse.java +++ b/library/java/net/openid/appauth/AuthorizationResponse.java @@ -21,11 +21,12 @@ import android.content.Intent; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import net.openid.appauth.internal.UriUtil; import org.json.JSONException; diff --git a/library/java/net/openid/appauth/AuthorizationService.java b/library/java/net/openid/appauth/AuthorizationService.java index 3fd5c054..cbeeb8b6 100644 --- a/library/java/net/openid/appauth/AuthorizationService.java +++ b/library/java/net/openid/appauth/AuthorizationService.java @@ -24,16 +24,16 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.customtabs.CustomTabsIntent; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.browser.customtabs.CustomTabsIntent; + import net.openid.appauth.AuthorizationException.GeneralErrors; import net.openid.appauth.AuthorizationException.RegistrationRequestErrors; import net.openid.appauth.AuthorizationException.TokenRequestErrors; - import net.openid.appauth.IdToken.IdTokenException; import net.openid.appauth.browser.BrowserDescriptor; import net.openid.appauth.browser.BrowserSelector; diff --git a/library/java/net/openid/appauth/AuthorizationServiceConfiguration.java b/library/java/net/openid/appauth/AuthorizationServiceConfiguration.java index 5d2b0e9a..6ad8fccb 100644 --- a/library/java/net/openid/appauth/AuthorizationServiceConfiguration.java +++ b/library/java/net/openid/appauth/AuthorizationServiceConfiguration.java @@ -19,8 +19,8 @@ import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import net.openid.appauth.AuthorizationException.GeneralErrors; diff --git a/library/java/net/openid/appauth/AuthorizationServiceDiscovery.java b/library/java/net/openid/appauth/AuthorizationServiceDiscovery.java index f74e0927..8a56ff6c 100644 --- a/library/java/net/openid/appauth/AuthorizationServiceDiscovery.java +++ b/library/java/net/openid/appauth/AuthorizationServiceDiscovery.java @@ -17,9 +17,9 @@ import static net.openid.appauth.Preconditions.checkNotNull; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import net.openid.appauth.JsonUtil.BooleanField; import net.openid.appauth.JsonUtil.Field; diff --git a/library/java/net/openid/appauth/ClientAuthentication.java b/library/java/net/openid/appauth/ClientAuthentication.java index 0928a713..c52d1607 100644 --- a/library/java/net/openid/appauth/ClientAuthentication.java +++ b/library/java/net/openid/appauth/ClientAuthentication.java @@ -14,7 +14,7 @@ package net.openid.appauth; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Map; diff --git a/library/java/net/openid/appauth/ClientSecretBasic.java b/library/java/net/openid/appauth/ClientSecretBasic.java index 62ef0be9..debc0320 100644 --- a/library/java/net/openid/appauth/ClientSecretBasic.java +++ b/library/java/net/openid/appauth/ClientSecretBasic.java @@ -16,9 +16,10 @@ import static net.openid.appauth.Preconditions.checkNotNull; -import android.support.annotation.NonNull; import android.util.Base64; +import androidx.annotation.NonNull; + import net.openid.appauth.internal.UriUtil; import java.util.Collections; diff --git a/library/java/net/openid/appauth/ClientSecretPost.java b/library/java/net/openid/appauth/ClientSecretPost.java index be93a233..1a9eca7d 100644 --- a/library/java/net/openid/appauth/ClientSecretPost.java +++ b/library/java/net/openid/appauth/ClientSecretPost.java @@ -16,7 +16,7 @@ import static net.openid.appauth.Preconditions.checkNotNull; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.HashMap; import java.util.Map; diff --git a/library/java/net/openid/appauth/IdToken.java b/library/java/net/openid/appauth/IdToken.java index ef9740b3..101632b9 100644 --- a/library/java/net/openid/appauth/IdToken.java +++ b/library/java/net/openid/appauth/IdToken.java @@ -15,12 +15,14 @@ package net.openid.appauth; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Base64; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import net.openid.appauth.AuthorizationException.GeneralErrors; + import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/JsonUtil.java b/library/java/net/openid/appauth/JsonUtil.java index d167dcd3..dac69204 100644 --- a/library/java/net/openid/appauth/JsonUtil.java +++ b/library/java/net/openid/appauth/JsonUtil.java @@ -17,8 +17,8 @@ import static net.openid.appauth.Preconditions.checkNotNull; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.json.JSONArray; import org.json.JSONException; diff --git a/library/java/net/openid/appauth/NoClientAuthentication.java b/library/java/net/openid/appauth/NoClientAuthentication.java index c5222b7d..97cb8a14 100644 --- a/library/java/net/openid/appauth/NoClientAuthentication.java +++ b/library/java/net/openid/appauth/NoClientAuthentication.java @@ -14,7 +14,7 @@ package net.openid.appauth; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Collections; import java.util.Map; diff --git a/library/java/net/openid/appauth/Preconditions.java b/library/java/net/openid/appauth/Preconditions.java index 1a8a5e71..faa916f4 100644 --- a/library/java/net/openid/appauth/Preconditions.java +++ b/library/java/net/openid/appauth/Preconditions.java @@ -14,10 +14,11 @@ package net.openid.appauth; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.util.Collection; /** diff --git a/library/java/net/openid/appauth/RegistrationRequest.java b/library/java/net/openid/appauth/RegistrationRequest.java index d2c577fc..b37eff0e 100644 --- a/library/java/net/openid/appauth/RegistrationRequest.java +++ b/library/java/net/openid/appauth/RegistrationRequest.java @@ -21,8 +21,8 @@ import static net.openid.appauth.Preconditions.checkNotNull; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/RegistrationResponse.java b/library/java/net/openid/appauth/RegistrationResponse.java index 475d7c09..e7eb04fb 100644 --- a/library/java/net/openid/appauth/RegistrationResponse.java +++ b/library/java/net/openid/appauth/RegistrationResponse.java @@ -20,9 +20,9 @@ import static net.openid.appauth.Preconditions.checkNotNull; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/TokenRequest.java b/library/java/net/openid/appauth/TokenRequest.java index e86fcb0b..18e62e2c 100644 --- a/library/java/net/openid/appauth/TokenRequest.java +++ b/library/java/net/openid/appauth/TokenRequest.java @@ -20,11 +20,12 @@ import static net.openid.appauth.Preconditions.checkNullOrNotEmpty; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/TokenResponse.java b/library/java/net/openid/appauth/TokenResponse.java index 0d0faa07..13563f0a 100644 --- a/library/java/net/openid/appauth/TokenResponse.java +++ b/library/java/net/openid/appauth/TokenResponse.java @@ -20,11 +20,12 @@ import static net.openid.appauth.Preconditions.checkNotNull; import static net.openid.appauth.Preconditions.checkNullOrNotEmpty; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import org.json.JSONException; import org.json.JSONObject; diff --git a/library/java/net/openid/appauth/browser/AnyBrowserMatcher.java b/library/java/net/openid/appauth/browser/AnyBrowserMatcher.java index 67177767..d3d96265 100644 --- a/library/java/net/openid/appauth/browser/AnyBrowserMatcher.java +++ b/library/java/net/openid/appauth/browser/AnyBrowserMatcher.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Matches any browser. diff --git a/library/java/net/openid/appauth/browser/BrowserBlacklist.java b/library/java/net/openid/appauth/browser/BrowserBlacklist.java index ad2ce094..ff71ea56 100644 --- a/library/java/net/openid/appauth/browser/BrowserBlacklist.java +++ b/library/java/net/openid/appauth/browser/BrowserBlacklist.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Arrays; import java.util.List; diff --git a/library/java/net/openid/appauth/browser/BrowserDescriptor.java b/library/java/net/openid/appauth/browser/BrowserDescriptor.java index c280c308..6ca76697 100644 --- a/library/java/net/openid/appauth/browser/BrowserDescriptor.java +++ b/library/java/net/openid/appauth/browser/BrowserDescriptor.java @@ -16,9 +16,10 @@ import android.content.pm.PackageInfo; import android.content.pm.Signature; -import android.support.annotation.NonNull; import android.util.Base64; +import androidx.annotation.NonNull; + import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.HashSet; diff --git a/library/java/net/openid/appauth/browser/BrowserMatcher.java b/library/java/net/openid/appauth/browser/BrowserMatcher.java index eb5acd20..d4a6d113 100644 --- a/library/java/net/openid/appauth/browser/BrowserMatcher.java +++ b/library/java/net/openid/appauth/browser/BrowserMatcher.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Determines whether a {@link BrowserDescriptor} matches some set of criteria. diff --git a/library/java/net/openid/appauth/browser/BrowserSelector.java b/library/java/net/openid/appauth/browser/BrowserSelector.java index 5f2862fb..b3f3881b 100644 --- a/library/java/net/openid/appauth/browser/BrowserSelector.java +++ b/library/java/net/openid/appauth/browser/BrowserSelector.java @@ -24,10 +24,10 @@ import android.net.Uri; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.customtabs.CustomTabsService; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.browser.customtabs.CustomTabsService; import java.util.ArrayList; import java.util.Iterator; diff --git a/library/java/net/openid/appauth/browser/BrowserWhitelist.java b/library/java/net/openid/appauth/browser/BrowserWhitelist.java index 69d41d01..e11cff0f 100644 --- a/library/java/net/openid/appauth/browser/BrowserWhitelist.java +++ b/library/java/net/openid/appauth/browser/BrowserWhitelist.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Arrays; import java.util.List; diff --git a/library/java/net/openid/appauth/browser/Browsers.java b/library/java/net/openid/appauth/browser/Browsers.java index 4e0e8953..3f70101e 100644 --- a/library/java/net/openid/appauth/browser/Browsers.java +++ b/library/java/net/openid/appauth/browser/Browsers.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Collections; import java.util.Set; diff --git a/library/java/net/openid/appauth/browser/CustomTabManager.java b/library/java/net/openid/appauth/browser/CustomTabManager.java index c0074f1d..28573c54 100644 --- a/library/java/net/openid/appauth/browser/CustomTabManager.java +++ b/library/java/net/openid/appauth/browser/CustomTabManager.java @@ -18,14 +18,14 @@ import android.content.Context; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; -import android.support.customtabs.CustomTabsCallback; -import android.support.customtabs.CustomTabsClient; -import android.support.customtabs.CustomTabsIntent; -import android.support.customtabs.CustomTabsServiceConnection; -import android.support.customtabs.CustomTabsSession; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; +import androidx.browser.customtabs.CustomTabsCallback; +import androidx.browser.customtabs.CustomTabsClient; +import androidx.browser.customtabs.CustomTabsIntent; +import androidx.browser.customtabs.CustomTabsServiceConnection; +import androidx.browser.customtabs.CustomTabsSession; import net.openid.appauth.internal.Logger; import net.openid.appauth.internal.UriUtil; @@ -103,7 +103,7 @@ private void setClient(@Nullable CustomTabsClient client) { } /** - * Creates a {@link android.support.customtabs.CustomTabsIntent.Builder custom tab builder}, + * Creates a {@link androidx.browser.customtabs.CustomTabsIntent.Builder custom tab builder}, * with an optional list of optional URIs that may be requested. The URI list * should be ordered such that the most likely URI to be requested is first. If the selected * browser does not support custom tabs, then the URI list has no effect. @@ -129,7 +129,7 @@ public synchronized void dispose() { } /** - * Creates a {@link android.support.customtabs.CustomTabsSession custom tab session} for + * Creates a {@link androidx.browser.customtabs.CustomTabsSession custom tab session} for * use with a custom tab intent, with optional callbacks and optional list of URIs that may * be requested. The URI list should be ordered such that the most likely URI to be requested * is first. If no custom tab supporting browser is available, this will return {@code null}. diff --git a/library/java/net/openid/appauth/browser/DelimitedVersion.java b/library/java/net/openid/appauth/browser/DelimitedVersion.java index dbec5d66..3bf9ace1 100644 --- a/library/java/net/openid/appauth/browser/DelimitedVersion.java +++ b/library/java/net/openid/appauth/browser/DelimitedVersion.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Represents a delimited version number for an application. This can parse common version number diff --git a/library/java/net/openid/appauth/browser/ExactBrowserMatcher.java b/library/java/net/openid/appauth/browser/ExactBrowserMatcher.java index c3ca2605..c4c1a4e3 100644 --- a/library/java/net/openid/appauth/browser/ExactBrowserMatcher.java +++ b/library/java/net/openid/appauth/browser/ExactBrowserMatcher.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Matches only the specified browser. diff --git a/library/java/net/openid/appauth/browser/VersionRange.java b/library/java/net/openid/appauth/browser/VersionRange.java index 09546433..b95015c3 100644 --- a/library/java/net/openid/appauth/browser/VersionRange.java +++ b/library/java/net/openid/appauth/browser/VersionRange.java @@ -14,8 +14,8 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * A browser filter which matches when a browser falls into a version range. Versions are diff --git a/library/java/net/openid/appauth/browser/VersionedBrowserMatcher.java b/library/java/net/openid/appauth/browser/VersionedBrowserMatcher.java index 8c8c0628..3daa7dd2 100644 --- a/library/java/net/openid/appauth/browser/VersionedBrowserMatcher.java +++ b/library/java/net/openid/appauth/browser/VersionedBrowserMatcher.java @@ -14,7 +14,7 @@ package net.openid.appauth.browser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Collections; import java.util.Set; diff --git a/library/java/net/openid/appauth/connectivity/ConnectionBuilder.java b/library/java/net/openid/appauth/connectivity/ConnectionBuilder.java index 28125ca3..33ac8985 100644 --- a/library/java/net/openid/appauth/connectivity/ConnectionBuilder.java +++ b/library/java/net/openid/appauth/connectivity/ConnectionBuilder.java @@ -15,7 +15,7 @@ package net.openid.appauth.connectivity; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.IOException; import java.net.HttpURLConnection; diff --git a/library/java/net/openid/appauth/connectivity/DefaultConnectionBuilder.java b/library/java/net/openid/appauth/connectivity/DefaultConnectionBuilder.java index 9dba97f9..6f8324a1 100644 --- a/library/java/net/openid/appauth/connectivity/DefaultConnectionBuilder.java +++ b/library/java/net/openid/appauth/connectivity/DefaultConnectionBuilder.java @@ -15,7 +15,7 @@ package net.openid.appauth.connectivity; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import net.openid.appauth.Preconditions; diff --git a/library/java/net/openid/appauth/internal/Logger.java b/library/java/net/openid/appauth/internal/Logger.java index fc879edb..99068878 100644 --- a/library/java/net/openid/appauth/internal/Logger.java +++ b/library/java/net/openid/appauth/internal/Logger.java @@ -16,11 +16,12 @@ import static net.openid.appauth.Preconditions.checkNotNull; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + /** * Convenience wrapper around {@link android.util.Log}, which evaluates the current log level of * the logging tag once and uses this to determine whether logging should proceed. This minimizes diff --git a/library/java/net/openid/appauth/internal/UriUtil.java b/library/java/net/openid/appauth/internal/UriUtil.java index 84b9be65..fb7bf78d 100644 --- a/library/java/net/openid/appauth/internal/UriUtil.java +++ b/library/java/net/openid/appauth/internal/UriUtil.java @@ -16,12 +16,13 @@ import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsService; -import android.support.v4.util.Pair; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.browser.customtabs.CustomTabsService; +import androidx.core.util.Pair; + import net.openid.appauth.Preconditions; import java.io.UnsupportedEncodingException; diff --git a/library/javatests/net/openid/appauth/AuthorizationServiceConfigurationTest.java b/library/javatests/net/openid/appauth/AuthorizationServiceConfigurationTest.java index e3eb10de..e4e91eb2 100644 --- a/library/javatests/net/openid/appauth/AuthorizationServiceConfigurationTest.java +++ b/library/javatests/net/openid/appauth/AuthorizationServiceConfigurationTest.java @@ -23,7 +23,7 @@ import static org.mockito.Mockito.when; import android.net.Uri; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; diff --git a/library/javatests/net/openid/appauth/AuthorizationServiceTest.java b/library/javatests/net/openid/appauth/AuthorizationServiceTest.java index 078c5046..779ad541 100644 --- a/library/javatests/net/openid/appauth/AuthorizationServiceTest.java +++ b/library/javatests/net/openid/appauth/AuthorizationServiceTest.java @@ -19,11 +19,11 @@ import android.content.Intent; import android.graphics.Color; import android.net.Uri; -import android.support.annotation.ColorInt; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsClient; -import android.support.customtabs.CustomTabsIntent; -import android.support.customtabs.CustomTabsServiceConnection; +import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; +import androidx.browser.customtabs.CustomTabsClient; +import androidx.browser.customtabs.CustomTabsIntent; +import androidx.browser.customtabs.CustomTabsServiceConnection; import net.openid.appauth.AppAuthConfiguration.Builder; import net.openid.appauth.AuthorizationException.GeneralErrors; @@ -53,8 +53,8 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; -import static android.support.customtabs.CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE; -import static android.support.customtabs.CustomTabsIntent.EXTRA_TOOLBAR_COLOR; +import static androidx.browser.customtabs.CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE; +import static androidx.browser.customtabs.CustomTabsIntent.EXTRA_TOOLBAR_COLOR; import static net.openid.appauth.AuthorizationManagementActivity.KEY_AUTH_INTENT; import static net.openid.appauth.AuthorizationManagementActivity.KEY_AUTH_REQUEST; import static net.openid.appauth.AuthorizationManagementActivity.KEY_CANCEL_INTENT; diff --git a/library/javatests/net/openid/appauth/IdTokenTest.java b/library/javatests/net/openid/appauth/IdTokenTest.java index 3579bbb7..f19bcae6 100644 --- a/library/javatests/net/openid/appauth/IdTokenTest.java +++ b/library/javatests/net/openid/appauth/IdTokenTest.java @@ -1,6 +1,6 @@ package net.openid.appauth; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Base64; import java.util.Arrays; diff --git a/library/javatests/net/openid/appauth/browser/CustomTabManagerTest.java b/library/javatests/net/openid/appauth/browser/CustomTabManagerTest.java index fbad9000..02b3ce62 100644 --- a/library/javatests/net/openid/appauth/browser/CustomTabManagerTest.java +++ b/library/javatests/net/openid/appauth/browser/CustomTabManagerTest.java @@ -8,11 +8,11 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.customtabs.CustomTabsCallback; -import android.support.customtabs.CustomTabsClient; -import android.support.customtabs.CustomTabsService; -import android.support.customtabs.CustomTabsServiceConnection; -import android.support.customtabs.CustomTabsSession; +import androidx.browser.customtabs.CustomTabsCallback; +import androidx.browser.customtabs.CustomTabsClient; +import androidx.browser.customtabs.CustomTabsService; +import androidx.browser.customtabs.CustomTabsServiceConnection; +import androidx.browser.customtabs.CustomTabsSession; import java.util.List; import net.openid.appauth.BuildConfig; import org.junit.Before; diff --git a/library/javatests/net/openid/appauth/internal/UriUtilTest.java b/library/javatests/net/openid/appauth/internal/UriUtilTest.java index 0dfe2300..19b06245 100644 --- a/library/javatests/net/openid/appauth/internal/UriUtilTest.java +++ b/library/javatests/net/openid/appauth/internal/UriUtilTest.java @@ -17,10 +17,9 @@ import android.net.Uri; import android.net.UrlQuerySanitizer; import android.os.Bundle; -import android.support.customtabs.CustomTabsService; +import androidx.browser.customtabs.CustomTabsService; import net.openid.appauth.BuildConfig; -import net.openid.appauth.internal.UriUtil; import org.junit.Before; import org.junit.Test; diff --git a/library/javatests/resources/mockito-extensions/org.mockito.plugins.MockMaker b/library/javatests/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 00000000..ca6ee9ce --- /dev/null +++ b/library/javatests/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline \ No newline at end of file