Skip to content

Commit

Permalink
Update all libs and build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
RomaLikhachev committed Nov 8, 2024
1 parent b187cee commit 7c8e1c0
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.yugyd.buildlogic.convention.compose
import com.android.build.api.dsl.ApplicationExtension
import com.yugyd.buildlogic.convention.core.ANDROID_APPLICATION_ALIAS
import com.yugyd.buildlogic.convention.core.checkPlugin
import com.yugyd.buildlogic.convention.core.findPluginId
import com.yugyd.buildlogic.convention.core.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.getByType
Expand All @@ -28,6 +30,7 @@ class ComposeAndroidApplicationPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
checkPlugin(ANDROID_APPLICATION_ALIAS)
pluginManager.apply(libs.findPluginId("compose-compiler-plugin"))

val extension = extensions.getByType<ApplicationExtension>()
extension.configureCompose(target)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.yugyd.buildlogic.convention.compose
import com.android.build.gradle.LibraryExtension
import com.yugyd.buildlogic.convention.core.ANDROID_LIBRARY_ALIAS
import com.yugyd.buildlogic.convention.core.checkPlugin
import com.yugyd.buildlogic.convention.core.findPluginId
import com.yugyd.buildlogic.convention.core.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.getByType
Expand All @@ -28,6 +30,7 @@ class ComposeAndroidLibraryPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
checkPlugin(ANDROID_LIBRARY_ALIAS)
pluginManager.apply(libs.findPluginId("compose-compiler-plugin"))

val extension = extensions.getByType<LibraryExtension>()
extension.configureCompose(target)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
internal fun CommonExtension<*, *, *, *, *, *>.configureCompose(target: Project) {
buildFeatures.compose = true

composeOptions.kotlinCompilerExtensionVersion = target.libs.findVersion(
"compose-compiler",
).get().toString()

target.dependencies {
val bom = target.libs.findLibrary("compose-bom").get()
add(IMPLEMENTATION, platform(bom))
Expand Down
Binary file added build-logic/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions build-logic/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion build-logic/performance/clean-build.scenarios
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
clean_build {
title = "Clean build"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
cleanup-tasks = ["clean"]
Expand Down
2 changes: 1 addition & 1 deletion build-logic/performance/configuration.scenarios
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
clean_build {
title = "Configuration build"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["help"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
cleanup-tasks = ["clean"]
Expand Down
8 changes: 4 additions & 4 deletions build-logic/performance/incremental-build.scenarios
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
non_abi_change {
title = "Non ABI change"
tasks = ["assembleDebug"]
versions = ["8.6"]
versions = ["8.10.2"]
# gradle-args = ["--no-build-cache", "--no-configuration-cache"]
apply-non-abi-change-to = [
".kt"
Expand All @@ -13,7 +13,7 @@ non_abi_change {
abi_change {
title = "ABI change"
tasks = ["assembleDebug"]
versions = ["8.6"]
versions = ["8.10.2"]
# gradle-args = ["--no-build-cache", "--no-configuration-cache"]
apply-abi-change-to = [
".kt"
Expand All @@ -25,7 +25,7 @@ abi_change {
layout_change {
title = "Layout change"
tasks = ["assembleDebug"]
versions = ["8.6"]
versions = ["8.10.2"]
# gradle-args = ["--no-build-cache", "--no-configuration-cache"]
apply-android-layout-change-to = ".xml"
warm-ups = 2
Expand All @@ -35,7 +35,7 @@ layout_change {
string_resource_change {
title = "String resource change"
tasks = ["assembleDebug"]
versions = ["8.6"]
versions = ["8.10.2"]
# gradle-args = ["--no-build-cache", "--no-configuration-cache"]
apply-android-resource-value-change-to = ".xml"
warm-ups = 2
Expand Down
6 changes: 3 additions & 3 deletions build-logic/performance/jvm-args.scenarios
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default-scenarios = ["clean_build_xmx_3g"]

clean_build_xmx_3g {
title = "Clean build xmx 3g"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
jvm-args = ["-Xmx3g"]
Expand All @@ -14,7 +14,7 @@ clean_build_xmx_3g {

clean_build_gc_parallel {
title = "Clean build ParallelGC"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
jvm-args = ["-XX:+UseParallelGC"]
Expand All @@ -26,7 +26,7 @@ clean_build_gc_parallel {

clean_build_metaspace_512m {
title = "Clean build MaxMetaspaceSize 512m"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
jvm-args = ["-XX:MaxMetaspaceSize=512m"]
Expand Down
4 changes: 2 additions & 2 deletions build-logic/performance/plugin-version.scenarios
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default-scenarios = ["non_abi_change_agp_7_4_2"]

non_abi_change_agp_7_4_2 {
title = "Non ABI change AGP 7.4.2"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
system-properties {
Expand All @@ -19,7 +19,7 @@ non_abi_change_agp_7_4_2 {

non_abi_change_kotlin_1_8_22 {
title = "Non ABI change Kotlin 1.8.22"
versions = ["8.6"]
versions = ["8.10.2"]
tasks = ["assembleDebug"]
gradle-args = ["--no-build-cache", "--no-configuration-cache"]
system-properties {
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plugins {
alias(libs.plugins.firebase.appdistribution) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.gms) apply false
// Compose
alias(libs.plugins.compose.compiler.plugin) apply false
// DI
alias(libs.plugins.hilt.plugin) apply false
// Database
Expand Down
69 changes: 35 additions & 34 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,57 +1,55 @@
[versions]
# Gradle
android-gradle-plugin = '8.3.2'
android-gradle-plugin = '8.6.1'
# Kotlin
kotlin = '1.9.24'
kotlin = '2.0.21'
# UI
appcompat = '1.6.1'
material = '1.11.0'
compose-bom = '2024.06.00'
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility
compose-compiler = '1.5.14'
appcompat = '1.7.0'
material = '1.12.0'
compose-bom = '2024.10.01'
# DI
hilt = '2.49'
hilt = '2.52'
# Annotation processor
ksp = '1.9.24-1.0.20'
ksp = '2.0.21-1.0.27'
# Test
jacoco = "0.8.7"
# Other
crashlyticsVersion = '2.9.9'
coroutinesVersion = '1.7.3'
lifecycleVersion = '2.6.2'
crashlyticsVersion = '3.0.2'
coroutinesVersion = '1.9.0'
lifecycleVersion = '2.8.7'
androidxTest = '1.6.1'
core-ktx = '1.12.0'
core-ktx = '1.15.0'
roomVersion = '2.6.1'
workManagerVersion = '2.9.0'
firebaseVersion = '33.1.1'
accompanistVersion = '0.30.1'
versionsUpdates = '0.47.0'
workManagerVersion = '2.10.0'
firebaseVersion = '33.5.1'
accompanistVersion = '0.36.0'
versionsUpdates = '0.51.0'
# Build logic
compile-sdk = '34'
target-sdk = '34'
compile-sdk = '35'
target-sdk = '35'
min-sdk = '24'
convention = "1.0.0"

[libraries]
# Gradle
android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "android-gradle-plugin" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
google-services-plugin = { group = "com.google.gms", name = "google-services", version = '4.4.0' }
google-services-plugin = { group = "com.google.gms", name = "google-services", version = '4.4.2' }
firebase-crashlytics-gradle-plugin = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "crashlyticsVersion" }
firebase-appdistribution-gradle-plugin = { group = "com.google.firebase", name = "firebase-appdistribution-gradle", version = '4.0.0' }
firebase-appdistribution-gradle-plugin = { group = "com.google.firebase", name = "firebase-appdistribution-gradle", version = '5.0.0' }
hilt-gradle-plugin = { group = "com.google.dagger", name = "hilt-android-gradle-plugin", version.ref = 'hilt' }
update-versions-gradle-plugin = { group = "com.github.ben-manes", name = "gradle-versions-plugin", version.ref = 'versionsUpdates' }
ksp-gradle-plugin = { group = "com.google.devtools.ksp", name = "symbol-processing-gradle-plugin", version.ref = 'ksp' }
# Kotlin
kotlin-stdlib-core = { module = 'org.jetbrains.kotlin:kotlin-stdlib', version.ref = 'kotlin' }
kotlinx-serialization = { module = 'org.jetbrains.kotlinx:kotlinx-serialization-json', version = '1.6.2' }
kotlinx-serialization = { module = 'org.jetbrains.kotlinx:kotlinx-serialization-json', version = '1.7.3' }
# Coroutines
kotlinx-coroutines-core = { module = 'org.jetbrains.kotlinx:kotlinx-coroutines-core', version.ref = 'coroutinesVersion' }
kotlinx-coroutines-android = { module = 'org.jetbrains.kotlinx:kotlinx-coroutines-android', version.ref = 'coroutinesVersion' }
kotlinx-coroutines-play-services = { module = 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services', version.ref = 'coroutinesVersion' }
kotlinx-coroutines-test = { module = 'org.jetbrains.kotlinx:kotlinx-coroutines-test', version.ref = 'coroutinesVersion' }
# AndroidX
androidx-annotation = { module = 'androidx.annotation:annotation', version = '1.7.0' }
androidx-annotation = { module = 'androidx.annotation:annotation', version = '1.9.1' }
core-ktx = { module = 'androidx.core:core-ktx', version.ref = 'core-ktx' }
appcompat = { module = 'androidx.appcompat:appcompat', version.ref = 'appcompat' }
lifecycle-viewmodel-ktx = { module = 'androidx.lifecycle:lifecycle-viewmodel-ktx', version.ref = 'lifecycleVersion' }
Expand All @@ -62,7 +60,7 @@ datastore = { module = 'androidx.datastore:datastore-preferences', version = '1.
# Compose
compose-bom = { module = 'androidx.compose:compose-bom', version.ref = 'compose-bom' }
# Material Design 3
compose-material3 = { module = 'androidx.compose.material3:material3', version = '1.1.2' }
compose-material3 = { module = 'androidx.compose.material3:material3', version = '1.3.1' }
# Android Studio Preview support
compose-ui-tooling-preview = { module = 'androidx.compose.ui:ui-tooling-preview' }
compose-ui-tooling = { module = 'androidx.compose.ui:ui-tooling' }
Expand All @@ -71,13 +69,13 @@ compose-material-icons = { module = 'androidx.compose.material:material-icons-ex
# UI Foundation
compose-ui-graphics = { module = 'androidx.compose.ui:ui-graphics' }
# Optional - Integration with activities and ViewModels
compose-activity = { module = 'androidx.activity:activity-compose', version = '1.8.1' }
compose-viewmodel = { module = 'androidx.lifecycle:lifecycle-viewmodel-compose', version = '2.6.2' }
compose-lifecycle = { module = 'androidx.lifecycle:lifecycle-runtime-compose', version = '2.6.2' }
compose-activity = { module = 'androidx.activity:activity-compose', version = '1.9.3' }
compose-viewmodel = { module = 'androidx.lifecycle:lifecycle-viewmodel-compose', version = '2.8.7' }
compose-lifecycle = { module = 'androidx.lifecycle:lifecycle-runtime-compose', version = '2.8.7' }
# Navigation
navigation-runtime = { module = 'androidx.navigation:navigation-runtime-ktx', version = '2.7.5' }
compose-navigation = { module = 'androidx.navigation:navigation-compose', version = '2.7.5' }
compose-hilt-navigation = { module = 'androidx.hilt:hilt-navigation-compose', version = '1.1.0' }
navigation-runtime = { module = 'androidx.navigation:navigation-runtime-ktx', version = '2.8.3' }
compose-navigation = { module = 'androidx.navigation:navigation-compose', version = '2.8.3' }
compose-hilt-navigation = { module = 'androidx.hilt:hilt-navigation-compose', version = '1.2.0' }
# Accompanist
accompanist-drawablepainter = { module = 'com.google.accompanist:accompanist-drawablepainter', version.ref = 'accompanistVersion' }
accompanist-systemuicontroller = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanistVersion" }
Expand All @@ -98,15 +96,15 @@ room-testing = { module = 'androidx.room:room-testing', version.ref = 'roomVersi
# WorkManager
work-manager-ktx = { module = 'androidx.work:work-runtime-ktx', version.ref = 'workManagerVersion' }
# Google
play-ads = { module = 'com.google.android.gms:play-services-ads', version = '23.2.0' }
play-ads = { module = 'com.google.android.gms:play-services-ads', version = '23.5.0' }
# Firebase
firebase-bom = { module = 'com.google.firebase:firebase-bom', version.ref = 'firebaseVersion' }
firebase-analytics = { module = 'com.google.firebase:firebase-analytics-ktx' }
firebase-crashlytics = { module = 'com.google.firebase:firebase-crashlytics-ktx' }
firebase-messages = { module = 'com.google.firebase:firebase-messaging-ktx' }
firebase-config = { module = 'com.google.firebase:firebase-config-ktx' }
# Coil
coil-compose = { module = 'io.coil-kt:coil-compose', version = '2.4.0' }
coil-compose = { module = 'io.coil-kt:coil-compose', version = '2.7.0' }
# Test
junit-core = { module = 'junit:junit', version = '4.13.2' }
kotlin-test = { module = 'org.jetbrains.kotlin:kotlin-test', version.ref = 'kotlin' }
Expand All @@ -123,9 +121,12 @@ android-library = { id = "com.android.library", version.ref = "android-gradle-pl
android-test = { id = "com.android.test", version.ref = "android-gradle-plugin" }

# Google services
firebase-appdistribution = { id = "com.google.firebase.appdistribution", version = "4.0.0" }
firebase-appdistribution = { id = "com.google.firebase.appdistribution", version = "5.0.0" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "crashlyticsVersion" }
gms = { id = "com.google.gms.google-services", version = '4.3.15' }
gms = { id = "com.google.gms.google-services", version = '4.4.2' }

# Compose
compose-compiler-plugin = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

# DI
hilt-plugin = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,5 +579,6 @@ class ContentViewModelTest {
name = "Name $index",
filePath = filePath ?: "file://data/${index}.txt",
isChecked = isChecked,
contentMarker = "Foo",
)
}
6 changes: 4 additions & 2 deletions product/main/main-ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -23,7 +24,8 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ internal class MainActivity : FragmentActivity() {
}
}

override fun onNewIntent(intent: Intent?) {
override fun onNewIntent(intent: Intent) {
processPush(intent)
super.onNewIntent(intent)
}
Expand Down
4 changes: 2 additions & 2 deletions product/profile/profile-ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->

<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<string name="profile_title_content">Content</string>
<string name="profile_title_content_not_selected">No content selected</string>
Expand Down Expand Up @@ -48,6 +48,6 @@

<string name="format_version">%1$s version</string>
<string name="format_time_second">%1$.1f sec.</string>
<string name="format_round_time_second">%1$d sec.</string>
<string name="format_round_time_second" tools:ignore="PluralsCandidate">%1$d sec.</string>

</resources>
4 changes: 2 additions & 2 deletions product/profile/transition-ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
~ limitations under the License.
-->

<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<string name="title_show_answer">Viewing the answer</string>
<string name="format_time_second">%1$.1f sec.</string>
<string name="format_round_time_second">%1$d sec.</string>
<string name="format_round_time_second" tools:ignore="PluralsCandidate">%1$d sec.</string>

</resources>

0 comments on commit 7c8e1c0

Please sign in to comment.