Skip to content

Commit

Permalink
Update build tools and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Feb 21, 2024
1 parent df6f331 commit 48e0b00
Show file tree
Hide file tree
Showing 33 changed files with 83 additions and 89 deletions.
29 changes: 15 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,35 @@ buildscript {
ext.cronetVersion = '102.5005.125'
ext.wearableVersion = '0.1.1'

ext.kotlinVersion = '1.7.22'
ext.coroutineVersion = '1.6.4'
ext.kotlinVersion = '1.9.22'
ext.coroutineVersion = '1.7.3'

ext.annotationVersion = '1.5.0'
ext.annotationVersion = '1.7.1'
ext.appcompatVersion = '1.6.1'
ext.biometricVersion = '1.1.0'
ext.coreVersion = '1.9.0'
ext.fragmentVersion = '1.5.5'
ext.lifecycleVersion = '2.5.1'
ext.coreVersion = '1.12.0'
ext.fragmentVersion = '1.6.2'
ext.lifecycleVersion = '2.7.0'
ext.loaderVersion = '1.1.0'
ext.mediarouterVersion = '1.3.1'
ext.materialVersion = '1.11.0'
ext.mediarouterVersion = '1.6.0'
ext.multidexVersion = '2.0.1'
ext.navigationVersion = '2.5.3'
ext.navigationVersion = '2.7.7'
ext.preferenceVersion = '1.2.0'
ext.recyclerviewVersion = '1.2.0'
ext.webkitVersion = '1.4.0'
ext.recyclerviewVersion = '1.3.2'
ext.webkitVersion = '1.10.0'

ext.slf4jVersion = '1.7.36'
ext.volleyVersion = '1.2.1'
ext.wireVersion = '4.8.0'

ext.androidBuildGradleVersion = '8.0.2'
ext.androidBuildGradleVersion = '8.2.2'

ext.androidBuildVersionTools = '33.0.1'
ext.androidBuildVersionTools = '34.0.0'

ext.androidMinSdk = 14
ext.androidMinSdk = 19
ext.androidTargetSdk = 29
ext.androidCompileSdk = 33
ext.androidCompileSdk = 34

ext.localProperties = new Properties()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) {
}
}

class FirebaseAuthServiceImpl(private val context: Context, private val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner {
class FirebaseAuthServiceImpl(private val context: Context, override val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner {
private val client by lazy { IdentityToolkitClient(context, apiKey, packageName, PackageUtils.firstSignatureDigestBytes(context, packageName)) }
private var authorizedDomain: String? = null

Expand Down Expand Up @@ -151,8 +151,6 @@ class FirebaseAuthServiceImpl(private val context: Context, private val lifecycl
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun applyActionCode(request: ApplyActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: applyActionCode")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -81,10 +81,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -144,12 +144,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -206,6 +210,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -26,7 +26,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -41,7 +42,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -76,13 +77,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 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
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private const val EXTRA_REQUEST_ID = "requestId"
private const val TIMEOUT = 1000 * 60 * 5 // 5 minutes
private const val MESSAGE_MAX_LEN = 140

class SmsRetrieverCore(private val context: Context, private val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver {
class SmsRetrieverCore(private val context: Context, override val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver {
private val requests: HashMap<Int, SmsRetrieverRequest> = hashMapOf()
private val requestIdCounter = AtomicInteger(0)
private lateinit var timeoutBroadcastReceiver: BroadcastReceiver
Expand All @@ -66,8 +66,6 @@ class SmsRetrieverCore(private val context: Context, private val lifecycle: Life
lifecycle.addObserver(this)
}

override fun getLifecycle(): Lifecycle = lifecycle

@TargetApi(19)
private fun configureBroadcastListenersIfNeeded() {
synchronized(this) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ class SmsRetrieverService : BaseService(TAG, GmsService.SMS_RETRIEVER) {
}


class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, private val lifecycle: Lifecycle) :
class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, override val lifecycle: Lifecycle) :
ISmsRetrieverApiService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle

override fun startSmsRetriever(callback: ISmsRetrieverResultCallback) {
Log.d(TAG, "startSmsRetriever()")
lifecycleScope.launchWhenStarted {
Expand Down
2 changes: 1 addition & 1 deletion play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ dependencies {
implementation "androidx.webkit:webkit:$webkitVersion"

// Material Components
implementation 'com.google.android.material:material:1.9.0'
implementation "com.google.android.material:material:$materialVersion"

// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class LoaderActivity : AppCompatActivity() {
Uri.parse(fallbackUrl)
}
Log.d(TAG, "Opening fallback $fallbackUrl")
// noinspection UnsafeImplicitIntentLaunch
val intent = Intent(ACTION_VIEW, uri).apply { addCategory(CATEGORY_BROWSABLE) }
startActivity(intent)
finishResult(RESULT_OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class WebViewHelper(private val activity: AppCompatActivity, private val webView
}
if (allowedPrefixes.isNotEmpty() && allowedPrefixes.none { url.startsWith(it) }) {
try {
// noinspection UnsafeImplicitIntentLaunch
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).apply { addCategory(Intent.CATEGORY_BROWSABLE) })
} catch (e: Exception) {
Log.w(TAG, "Error forwarding to browser", e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AuthProxyService : BaseService(TAG, GmsService.AUTH_PROXY) {
}
}

class AuthServiceImpl(private val context: Context, private val lifecycle: Lifecycle, private val packageName: String) : IAuthService.Stub(), LifecycleOwner {
class AuthServiceImpl(private val context: Context, override val lifecycle: Lifecycle, private val packageName: String) : IAuthService.Stub(), LifecycleOwner {
override fun performProxyRequest(callbacks: IAuthCallbacks, request: ProxyRequest) {
Log.d(TAG, "performProxyRequest($packageName, $request)")
lifecycleScope.launchWhenStarted {
Expand All @@ -57,7 +57,5 @@ class AuthServiceImpl(private val context: Context, private val lifecycle: Lifec
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ class AuthSignInService : BaseService(TAG, GmsService.AUTH_SIGN_IN) {

class AuthSignInServiceImpl(
private val context: Context,
private val lifecycle: Lifecycle,
override val lifecycle: Lifecycle,
private val packageName: String,
private val account: Account?,
private val scopes: List<Scope>,
private val extras: Bundle
) : ISignInService.Stub(), LifecycleOwner {
private val queue = singleInstanceOf { Volley.newRequestQueue(context.applicationContext) }
override fun getLifecycle(): Lifecycle = lifecycle

override fun silentSignIn(callbacks: ISignInCallbacks, options: GoogleSignInOptions?) {
Log.d(TAG, "$packageName:silentSignIn($options)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ClearcutLoggerService : BaseService(TAG, GmsService.CLEARCUT_LOGGER) {
}
}

class ClearcutLoggerServiceImpl(private val lifecycle: Lifecycle) : IClearcutLoggerService.Stub(), LifecycleOwner {
class ClearcutLoggerServiceImpl(override val lifecycle: Lifecycle) : IClearcutLoggerService.Stub(), LifecycleOwner {
private var collectForDebugExpiryTime: Long = 0

override fun log(callbacks: IClearcutLoggerCallbacks, event: LogEventParcelable) {
Expand Down Expand Up @@ -73,7 +73,5 @@ class ClearcutLoggerServiceImpl(private val lifecycle: Lifecycle) : IClearcutLog
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class CredentialManagerService : BaseService(TAG, GmsService.CREDENTIAL_MANAGER)

}

private class CredentialManagerServiceImpl(private val context: Context, private val lifecycle: Lifecycle) : ICredentialManagerService.Stub(), LifecycleOwner {
override fun getLifecycle(): Lifecycle = lifecycle
private class CredentialManagerServiceImpl(private val context: Context, override val lifecycle: Lifecycle) : ICredentialManagerService.Stub(), LifecycleOwner {

override fun getCredentialManagerIntent(callback: IPendingIntentCallback?, params: CredentialManagerInvocationParams?) {
Log.d(TAG, "Not yet implemented: getCredentialManagerIntent $params")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ class GamesConnectService : BaseService(TAG, GmsService.GAMES) {
}
}

class GamesConnectServiceImpl(val context: Context, private val lifecycle: Lifecycle, val packageName: String) : IGamesConnectService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle
class GamesConnectServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String) : IGamesConnectService.Stub(), LifecycleOwner {

override fun signIn(callback: IGamesConnectCallbacks?, request: GamesSignInRequest?) {
Log.d(TAG, "signIn($request)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ class GamesService : BaseService(TAG, GmsService.GAMES) {
}
}

class GamesServiceImpl(val context: Context, private val lifecycle: Lifecycle, val packageName: String, val account: Account, val player: Player) :
class GamesServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String, val account: Account, val player: Player) :
IGamesService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle

override fun clientDisconnecting(clientId: Long) {
Log.d(TAG, "Not yet implemented: clientDisconnecting($clientId)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ class PushRegisterService : LifecycleService() {
}
}

internal class PushRegisterHandler(private val context: Context, private val database: GcmDatabase, private val lifecycle: Lifecycle) : Handler(), LifecycleOwner {
override fun getLifecycle(): Lifecycle = lifecycle
internal class PushRegisterHandler(private val context: Context, private val database: GcmDatabase, override val lifecycle: Lifecycle) : Handler(), LifecycleOwner {

private var callingUid = 0
override fun sendMessageAtTime(msg: Message, uptimeMillis: Long): Boolean {
Expand Down Expand Up @@ -352,7 +351,7 @@ internal class PushRegisterHandler(private val context: Context, private val dat
class PushRegisterReceiver : WakefulBroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val intent2 = Intent(context, PushRegisterService::class.java)
if (intent.extras!!["delete"] != null) {
if (intent.extras!!.get("delete") != null) {
intent2.action = ACTION_C2DM_UNREGISTER
} else {
intent2.action = ACTION_C2DM_REGISTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GoogleHelpRedirectActivity : AppCompatActivity() {
// Long-term best is to not redirect to web but instead implement the thing properly, allowing us also to show
// option items, do proper theming for better integration, etc.
Log.d(TAG, "Open $uri for $callingPackage/${googleHelp.appContext} in Browser")
// noinspection UnsafeImplicitIntentLaunch
startActivity(Intent(Intent.ACTION_VIEW, uri))
finish()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ class SignInService : BaseService(TAG, GmsService.SIGN_IN) {
}
}

class SignInServiceImpl(val context: Context, private val lifecycle: Lifecycle, val packageName: String, val scopes: Array<Scope>) : ISignInService.Stub(),
class SignInServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String, val scopes: Array<Scope>) : ISignInService.Stub(),
LifecycleOwner {
override fun getLifecycle(): Lifecycle = lifecycle

override fun clearAccountFromSessionStore(sessionId: Int) {
Log.d(TAG, "Not yet implemented: clearAccountFromSessionStore $sessionId")
Expand Down
4 changes: 4 additions & 0 deletions play-services-core/src/main/res/values-night-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.App" parent="Theme.Base.DayNight.NoActionBar" />
</resources>
12 changes: 12 additions & 0 deletions play-services-core/src/main/res/values-v27/themes.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Base.Light">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">true</item>
</style>
<style name="Theme.Base.Dark">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">false</item>
</style>
</resources>
4 changes: 1 addition & 3 deletions play-services-core/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.App" parent="Theme.Base.DayNight.NoActionBar">
<item name="isMaterial3DynamicColorApplied">true</item>
</style>
<style name="Theme.App" parent="Theme.Base.DayNight.NoActionBar" />
</resources>
Loading

0 comments on commit 48e0b00

Please sign in to comment.