Skip to content

Commit

Permalink
Merge pull request #45 from leinardi/task/update-dependencies
Browse files Browse the repository at this point in the history
Task: Update dependencies & fix deprecations
  • Loading branch information
leinardi committed Oct 10, 2023
2 parents e47f2d8 + afac933 commit 96c4c0c
Show file tree
Hide file tree
Showing 52 changed files with 7,516 additions and 6,776 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ jobs:
# Allow tests to continue on other devices if they fail on one device.
fail-fast: false
matrix:
api-level: [24, 30]
api-level: [26, 30]
target: [google_apis]
arch: [x86_64]

Expand Down
2 changes: 1 addition & 1 deletion apps/forlago/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ dependencies {
implementation(libs.androidx.profileinstaller) // Need this to side load a Baseline Profile when Benchmarking
implementation(libs.androidx.startup)

kaptAndroidTest(libs.hilt.android.compiler)
kspAndroidTest(libs.hilt.android.compiler)

debugImplementation(libs.androidx.compose.tooling)
debugImplementation(libs.androidx.tracing) // can be removed after the AGP fixes this https://github.com/android/android-test/issues/1755
Expand Down
6 changes: 2 additions & 4 deletions apps/forlago/src/main/kotlin/com/leinardi/forlago/Forlago.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ class Forlago : Application(), ImageLoaderFactory {
.detectFileUriExposure()
.penaltyLog()
.penaltyDeath()
.detectContentUriWithoutPermission()
// .detectUntaggedSockets() // https://github.com/square/okhttp/issues/3537#issuecomment-974861679
.apply {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
detectContentUriWithoutPermission()
// detectUntaggedSockets() // https://github.com/square/okhttp/issues/3537#issuecomment-974861679
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
detectCredentialProtectedWhileLocked()
detectImplicitDirectBoot()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
Expand All @@ -51,6 +49,7 @@ import com.google.android.play.core.appupdate.AppUpdateOptions
import com.google.android.play.core.common.IntentSenderForResultStarter
import com.google.android.play.core.install.model.ActivityResult.RESULT_IN_APP_UPDATE_FAILED
import com.google.android.play.core.install.model.AppUpdateType
import com.leinardi.forlago.library.android.api.ext.enableEdgeToEdgeCompat
import com.leinardi.forlago.library.android.api.ext.requireActivity
import com.leinardi.forlago.library.navigation.api.navigator.ForlagoNavigator
import com.leinardi.forlago.library.navigation.api.navigator.NavigatorEvent
Expand Down Expand Up @@ -91,7 +90,7 @@ class MainActivity : AppCompatActivity() { // AppCompatActivity is needed to be
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen() // must be called before super.onCreate()
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdgeCompat()
setContent {
ForlagoTheme(dynamicColor = viewModel.viewState.value.dynamicColors) {
ForlagoMainScreen(
Expand Down Expand Up @@ -157,7 +156,7 @@ class MainActivity : AppCompatActivity() { // AppCompatActivity is needed to be
}
}

@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterialNavigationApi::class)
@OptIn(ExperimentalMaterialNavigationApi::class)
@Suppress("ReusedModifierInstance")
@Composable
fun ForlagoMainScreen(
Expand Down
1,972 changes: 983 additions & 989 deletions apps/forlago/versions/dependencies/benchmarkRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,133 changes: 1,064 additions & 1,069 deletions apps/forlago/versions/dependencies/benchmarkUnitTestRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2,006 changes: 1,000 additions & 1,006 deletions apps/forlago/versions/dependencies/debugRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,167 changes: 1,081 additions & 1,086 deletions apps/forlago/versions/dependencies/debugUnitTestRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

1,972 changes: 983 additions & 989 deletions apps/forlago/versions/dependencies/releaseRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,133 changes: 1,064 additions & 1,069 deletions apps/forlago/versions/dependencies/releaseUnitTestRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>

<uses-sdk
android:minSdkVersion="24"
android:minSdkVersion="26"
android:targetSdkVersion="34" />

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>

<uses-sdk
android:minSdkVersion="24"
android:minSdkVersion="26"
android:targetSdkVersion="34" />

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>

<uses-sdk
android:minSdkVersion="24"
android:minSdkVersion="26"
android:targetSdkVersion="34" />

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.accessors.dm.LibrariesForLibs
plugins {
id("com.android.application")
id("forlago.android-conventions")
id("com.google.devtools.ksp")
id("kotlin-parcelize")
id("com.google.dagger.hilt.android")
id("com.mikepenz.aboutlibraries.plugin")
Expand All @@ -46,9 +47,6 @@ android {
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}
compileOptions {
isCoreLibraryDesugaringEnabled = true // https://developer.android.com/studio/write/java8-support#library-desugaring
}
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
Expand Down Expand Up @@ -76,7 +74,6 @@ aboutLibraries {
}

dependencies {
coreLibraryDesugaring(libs.desugar)
debugImplementation(libs.leakcanary)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.core.ktx)
Expand All @@ -90,7 +87,7 @@ dependencies {
implementation(libs.kotlin.result)
implementation(libs.kotlinx.collections.immutable)
implementation(libs.timber)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)

testImplementation(project(":modules:library-test"))
androidTestImplementation(project(":modules:library-test-android"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("kotlin-android")
id("kotlin-kapt")
id("forlago.detekt-conventions")
id("forlago.config-conventions")
}

val libs = the<LibrariesForLibs>()

kapt {
useBuildCache = true
correctErrorTypes = true
javacOptions {
option("-Xmaxerrs", Integer.MAX_VALUE)
}
}

plugins.withType<AndroidBasePlugin>().configureEach {
extensions.configure<BaseExtension> {
compileSdkVersion(config.android.compileSdk.get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
implementation(libs.kotlin.result)
implementation(libs.kotlin.result.coroutines)
implementation(libs.timber)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)

androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.ext.junit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ plugins {
val libs = the<LibrariesForLibs>()

android {
compileOptions {
isCoreLibraryDesugaringEnabled = true // https://developer.android.com/studio/write/java8-support#library-desugaring
}
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
Expand All @@ -44,7 +41,6 @@ android {
}

dependencies {
coreLibraryDesugaring(libs.desugar)
implementation(libs.androidx.core.ktx)
implementation(libs.coroutines.android)
implementation(libs.coroutines.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ val config = extensions.create<ConfigExt>("config").apply {
accountType.convention("com.leinardi.forlago.auth")
compileSdk.convention(34)
javaVersion.convention(JavaVersion.VERSION_17)
minSdk.convention(24)
minSdk.convention(26)
targetSdk.convention(34)
}

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ android.experimental.enableSourceSetPathsMap=true
android.nonFinalResIds=true
android.nonTransitiveRClass=true
android.useAndroidX=true
kapt.include.compile.classpath=false

# Kotlin
kotlin.code.style=official
Expand Down
59 changes: 29 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Sharing dependency versions between projects
# https://docs.gradle.org/current/userguide/platforms.html
[versions]
aboutlibraries = "10.8.3"
accompanist = "0.33.0-alpha"
androidx-compose = "1.6.0-alpha02"
androidx-compose-compiler = "1.5.0"
aboutlibraries = "10.9.1"
accompanist = "0.33.1-alpha"
androidx-compose = "1.6.0-alpha07"
androidx-compose-compiler = "1.5.3"
androidx-datastore = "1.0.0"
androidx-lifecycle = "2.6.1"
androidx-navigation = "2.7.0-rc01"
androidx-lifecycle = "2.6.2"
androidx-navigation = "2.7.4"
androidx-room = "2.5.2"
apollo = "3.8.2"
coroutines = "1.7.3"
detekt = "1.23.1"
diktat = "1.2.5"
gradle = "8.2.1"
gradle = "8.3"
greclipse = "4.19"
hilt = "2.47"
kotlin = "1.9.0"
hilt = "2.48.1"
kotlin = "1.9.10"
kotlin-result = "1.1.18"
kotlinpoet = "1.14.2"
ksp = "1.9.0-1.0.13"
ksp = "1.9.10-1.0.13"
ktlint = "0.43.0"
mockk = "1.13.5"
material3 = "1.2.0-alpha09"
mockk = "1.13.8"
okhttp = "4.11.0"
play-app-update = "2.1.0"
prettier = "2.7.1"
Expand All @@ -33,24 +34,22 @@ aboutlibraries-core = { module = "com.mikepenz:aboutlibraries-core", version.ref
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
accompanist-insets-ui = { module = "com.google.accompanist:accompanist-insets-ui", version.ref = "accompanist" }
accompanist-navigation-material = { module = "com.google.accompanist:accompanist-navigation-material", version.ref = "accompanist" }
accompanist-pager-indicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanist" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist-placeholder = { module = "com.google.accompanist:accompanist-placeholder-material3", version.ref = "accompanist" }
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" }
android-maps-utils = "com.google.maps.android:android-maps-utils:3.5.1"
androidx-activity-compose = "androidx.activity:activity-compose:1.7.2"
android-maps-utils = "com.google.maps.android:android-maps-utils:3.5.3"
androidx-activity-compose = "androidx.activity:activity-compose:1.8.0"
androidx-appcompat = "androidx.appcompat:appcompat:1.6.1"
androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.2.0-beta02"
androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.2.0-rc01"
androidx-biometric = "androidx.biometric:biometric:1.2.0-alpha05"
androidx-browser = "androidx.browser:browser:1.5.0"
androidx-browser = "androidx.browser:browser:1.6.0"
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
androidx-compose-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "androidx-compose" }
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }
androidx-compose-material-android = { module = "androidx.compose.material:material-android", version.ref = "androidx-compose" }
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidx-compose" }
androidx-compose-material3 = "androidx.compose.material3:material3:1.2.0-alpha04"
androidx-compose-material3-window-size = "androidx.compose.material3:material3-window-size-class:1.1.1"
androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
androidx-compose-material3-window-size = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "material3" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose" }
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata", version.ref = "androidx-compose" }
androidx-compose-test = { module = "androidx.compose.test:test-core", version.ref = "androidx-compose" }
Expand All @@ -59,7 +58,7 @@ androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androi
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
androidx-constraintlayout-compose = "androidx.constraintlayout:constraintlayout-compose:1.0.1"
androidx-core-ktx = "androidx.core:core-ktx:1.12.0-beta01"
androidx-core-ktx = "androidx.core:core-ktx:1.12.0"
androidx-core-splashscreen = "androidx.core:core-splashscreen:1.0.1"
androidx-customview = "androidx.customview:customview:1.2.0-alpha02"
androidx-customview-poolingcontainer = "androidx.customview:customview-poolingcontainer:1.0.0"
Expand All @@ -74,7 +73,7 @@ androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }
androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidx-navigation" }
androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidx-navigation" }
androidx-paging = "androidx.paging:paging-compose:3.2.0"
androidx-paging = "androidx.paging:paging-compose:3.2.1"
androidx-palette = "androidx.palette:palette:1.0.0"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.3.1"
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
Expand Down Expand Up @@ -107,7 +106,7 @@ detekt = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref
detekt-rules-compose = "ru.kode:detekt-rules-compose:1.3.0"
detekt-twitter-compose-rules = "com.twitter.compose.rules:detekt:0.0.26"
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" }
firebase-bom = "com.google.firebase:firebase-bom:32.2.2"
firebase-bom = "com.google.firebase:firebase-bom:32.3.1"
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" }
firebase-perf = { module = "com.google.firebase:firebase-perf-ktx" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
Expand All @@ -127,14 +126,14 @@ kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version
kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" }
kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlinpoet" }
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5"
kotlinx-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
kotlinx-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0"
ksp-symbol-processing-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
leakcanary = "com.squareup.leakcanary:leakcanary-android:2.12"
lottie-compose = "com.airbnb.android:lottie-compose:6.1.0"
maps = "com.google.maps.android:maps-ktx:3.4.0"
maps-compose = "com.google.maps.android:maps-compose:2.13.0"
maps = "com.google.maps.android:maps-ktx:4.0.0"
maps-compose = "com.google.maps.android:maps-compose:3.0.0"
maps-utils-ktx = "com.google.maps.android:maps-utils-ktx:3.4.0"
material = "com.google.android.material:material:1.9.0"
material = "com.google.android.material:material:1.10.0"
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
Expand All @@ -152,19 +151,19 @@ speeddial = "com.leinardi.android:speed-dial.compose:2.0.0-alpha01"
timber = "com.jakewharton.timber:timber:5.0.1"
tink = "com.google.crypto.tink:tink-android:1.10.0"
turingcomplete-onetimepassword = "dev.turingcomplete:kotlin-onetimepassword:2.4.0"
zoomable = "net.engawapg.lib:zoomable:1.4.3"
zoomable = "net.engawapg.lib:zoomable:1.5.1"

# plugins
plugin-aboutlibraries = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlibraries" }
plugin-android-gradle = "com.android.tools.build:gradle:8.1.0"
plugin-android-gradle = "com.android.tools.build:gradle:8.2.0-beta06"
plugin-androidcachefix = "gradle.plugin.org.gradle.android:android-cache-fix-gradle-plugin:2.7.3"
plugin-androidx-navigation-safeargs = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "androidx-navigation" }
plugin-appversioning = "io.github.reactivecircus.appversioning:app-versioning-gradle-plugin:1.3.1"
plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
plugin-easylauncher = "com.project.starter:easylauncher:6.2.0"
plugin-firebase-crashlytics = "com.google.firebase:firebase-crashlytics-gradle:2.9.7"
plugin-firebase-crashlytics = "com.google.firebase:firebase-crashlytics-gradle:2.9.9"
plugin-firebase-perf = "com.google.firebase:perf-plugin:1.4.2"
plugin-google-services = "com.google.gms:google-services:4.3.15"
plugin-google-services = "com.google.gms:google-services:4.4.0"
plugin-hilt = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
plugin-ksp = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
Expand Down
2 changes: 1 addition & 1 deletion modules/.module-template/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ dependencies {
implementation(projects.modules.library@PlaceholderName@Api)
implementation(libs.hilt.android)

kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
Expand All @@ -40,6 +39,7 @@ import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.PrimaryScrollableTabRow
import androidx.compose.material3.ProvideTextStyle
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
Expand Down Expand Up @@ -73,7 +73,6 @@ import com.leinardi.forlago.library.ui.component.LocalSnackbarHostState
import com.leinardi.forlago.library.ui.component.MainNavigationBarItem
import com.leinardi.forlago.library.ui.component.PreviewFeature
import com.leinardi.forlago.library.ui.component.Scaffold
import com.leinardi.forlago.library.ui.component.ScrollableTabRow
import com.leinardi.forlago.library.ui.component.SettingsGroup
import com.leinardi.forlago.library.ui.component.SettingsMenuLink
import com.leinardi.forlago.library.ui.component.SettingsMenuSwitch
Expand Down Expand Up @@ -105,8 +104,7 @@ private fun DebugScreen(
modifier = modifier
.nestedScroll(scrollBehavior.nestedScrollConnection)
.padding(LocalMainScaffoldPadding.current.value)
.consumeWindowInsets(LocalMainScaffoldPadding.current.value)
.navigationBarsPadding(),
.consumeWindowInsets(LocalMainScaffoldPadding.current.value),
topBar = {
TopAppBar(
title = stringResource(R.string.debug_screen),
Expand Down Expand Up @@ -334,10 +332,10 @@ private fun Features(
Column(
modifier = modifier,
) {
ScrollableTabRow(
PrimaryScrollableTabRow(
selectedTabIndex = pagerState.currentPage,
indicator = { tabPositions ->
TabRowDefaults.Indicator(
TabRowDefaults.PrimaryIndicator(
Modifier.tabIndicatorOffset(tabPositions[pagerState.currentPage]),
)
},
Expand Down
Loading

0 comments on commit 96c4c0c

Please sign in to comment.