From e309a316849a5dc36103e6698423d7e2831a32cc Mon Sep 17 00:00:00 2001 From: PahaAkos Date: Fri, 14 Jul 2023 21:48:13 +0200 Subject: [PATCH] Switch to new library catalog declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • com.android.tools.build:gradle to 8.2.0-alpha12 • com.google.firebase:firebase-bom to 32.2.0 --- .idea/gradle.xml | 5 +- .idea/migrations.xml | 10 +++ app/build.gradle.kts | 92 +++++++++++++----------- build.gradle.kts | 8 +-- gradle/libs.versions.toml | 81 +++++++++++++++++++++ gradle/wrapper/gradle-wrapper.properties | 4 +- 6 files changed, 149 insertions(+), 51 deletions(-) create mode 100644 .idea/migrations.xml create mode 100644 gradle/libs.versions.toml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index a090b3bd..3b25c615 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,10 +4,8 @@ diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 00000000..f8051a6f --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 15026cef..3121a3e9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,7 +1,6 @@ import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { id("com.android.application") id("com.google.gms.google-services") @@ -19,6 +18,7 @@ android { buildFeatures.dataBinding = true buildFeatures.viewBinding = true buildFeatures.buildConfig = true + buildFeatures.compose = true defaultConfig { applicationId = "de.dertyp7214.rboardthememanager" @@ -56,8 +56,17 @@ android { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + + composeOptions { + kotlinCompilerExtensionVersion = "1.4.8" + } + kotlinOptions { jvmTarget = JvmTarget.JVM_17.description + freeCompilerArgs += listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true" + ) } tasks.withType { @@ -70,7 +79,7 @@ android { jniLibs { useLegacyPackaging = true } - resources.excludes.add("META-INF/*") + resources.excludes.add("/META-INF/{AL2.0,LGPL2.1}") } namespace = "de.dertyp7214.rboardthememanager" } @@ -79,51 +88,50 @@ dependencies { implementation(project(":colorutilsc")) implementation(project(":mathc")) implementation(project(":rboardcomponents")) + implementation(platform(libs.firebase.bom)) + implementation(libs.firebase.messaging.ktx) + implementation(libs.firebase.analytics.ktx) - implementation(platform("com.google.firebase:firebase-bom:32.1.1")) - implementation("com.google.firebase:firebase-messaging-ktx:23.1.2") - implementation("com.google.firebase:firebase-analytics-ktx:21.3.0") - - implementation("com.github.DerTyp7214:PreferencesPlus:1.0") + implementation(libs.preferencesplus) - implementation("com.github.os72:protobuf-dynamic:1.0.1") + implementation(libs.protobuf.dynamic) - implementation("androidx.legacy:legacy-support-v4:1.0.0") - implementation("androidx.navigation:navigation-fragment-ktx:2.7.0-beta02") - implementation("androidx.navigation:navigation-ui-ktx:2.7.0-beta02") - implementation("org.apache.commons:commons-text:1.10.0") + implementation(libs.legacy.support.v4) + implementation(libs.navigation.fragment.ktx) + implementation(libs.navigation.ui.ktx) + implementation(libs.commons.text) - implementation("com.github.topjohnwu.libsu:core:$libsuVersion") - implementation("com.github.topjohnwu.libsu:io:$libsuVersion") - implementation("com.github.topjohnwu.libsu:nio:$libsuVersion") - implementation("dev.chrisbanes.insetter:insetter:0.6.1") - implementation("androidx.core:core-ktx:1.12.0-alpha05") + implementation(libs.core) + implementation(libs.io) + implementation(libs.nio) + implementation(libs.insetter) + implementation(libs.core.ktx) //noinspection DifferentStdlibGradleVersion - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.0") - implementation("androidx.core:core:1.12.0-alpha05") - implementation("com.google.android.material:material:1.11.0-alpha01") - implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha10") - implementation("androidx.preference:preference-ktx:1.2.0") - implementation("androidx.activity:activity-ktx:1.8.0-alpha06") - implementation("androidx.fragment:fragment-ktx:1.7.0-alpha01") - implementation("com.jaredrummler:android-shell:1.0.0") - implementation("com.google.firebase:firebase-analytics:21.3.0") - implementation("com.google.firebase:firebase-messaging:23.1.2") - implementation("com.google.code.gson:gson:2.10.1") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1") - implementation("com.bignerdranch.android:simple-item-decoration:1.0.0") - implementation("de.dertyp7214:PRDownloader:v0.6.0") - implementation("com.github.skydoves:balloon:1.5.5-SNAPSHOT") - implementation("androidx.appcompat:appcompat:1.7.0-alpha02") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.2.0-alpha01") - androidTestImplementation("androidx.test.espresso:espresso-core:3.6.0-alpha01") - implementation("androidx.browser:browser:1.6.0-beta01") - implementation("com.github.bumptech.glide:glide:4.15.1") - ksp("com.github.bumptech.glide:ksp:4.15.1") - implementation("com.github.murgupluoglu:flagkit-android:1.0.2") + implementation(libs.kotlin.stdlib) + implementation(libs.androidx.core) + implementation(libs.material) + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.preference.ktx) + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.fragment.ktx) + implementation(libs.android.shell) + implementation(libs.firebase.analytics) + implementation(libs.firebase.messaging) + implementation(libs.gson) + implementation(libs.androidx.lifecycle.viewmodel.ktx) + implementation(libs.simple.item.decoration) + implementation(libs.prdownloader) + implementation(libs.balloon) + implementation(libs.androidx.appcompat) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + implementation(libs.androidx.browser) + implementation(libs.glide) + ksp(libs.ksp) + implementation(libs.flagkit.android) implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar")))) - debugImplementation("androidx.compose.ui:ui-tooling:1.6.0-alpha01") - implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.0") + debugImplementation(libs.androidx.ui.tooling) + implementation(libs.kotlin.reflect) } diff --git a/build.gradle.kts b/build.gradle.kts index 02a027f2..2909f5cf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,11 +11,11 @@ buildscript { maven("https://oss.sonatype.org/content/repositories/snapshots/") } dependencies { - classpath("com.android.tools.build:gradle:8.2.0-alpha10") + classpath(libs.gradle) //noinspection DifferentKotlinGradleVersion classpath(kotlin("gradle-plugin", version = "1.9.0")) - classpath("com.google.gms:google-services:4.3.15") - //classpath("com.google.protobuf:protobuf-gradle-plugin:0.9.3") + classpath(libs.google.services) + //classpath(libs.protobuf) } } @@ -32,6 +32,6 @@ allprojects { tasks { val clean by registering(Delete::class) { - delete(buildDir) + delete(layout.buildDirectory) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..94d706e7 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,81 @@ +[versions] +activity-ktx = "1.8.0-alpha06" +android-shell = "1.0.0" +androidx-junit = "1.2.0-alpha01" +appcompat = "1.7.0-alpha02" +balloon = "1.5.5-SNAPSHOT" +browser = "1.6.0-beta01" +commons-text = "1.10.0" +constraintlayout = "2.2.0-alpha10" +core-ktx = "1.12.0-alpha05" +espresso-core = "3.6.0-alpha01" +firebase-bom = "32.2.0" +firebase-analytics-ktx = "21.3.0" +firebase-messaging-ktx = "23.2.0" +flagkit-android = "1.0.2" +fragment-ktx = "1.7.0-alpha01" +googleServices = "4.3.15" +gradle = "8.2.0-alpha12" +gson = "2.10.1" +insetter = "0.6.1" +junit = "4.13.2" +kotlin-reflect = "1.9.0" +ksp = "4.15.1" +legacy-support-v4 = "1.0.0" +libsuVersion = "5.1.0" +lifecycle-viewmodel-ktx = "2.6.1" +material = "1.11.0-alpha01" +navigation-fragment-ktx = "2.7.0-beta02" +prdownloader = "v0.6.0" +preference-ktx = "1.2.0" +preferencesplus = "1.0" +protobuf-dynamic = "1.0.1" +protobuf = "0.9.3" +simple-item-decoration = "1.0.0" +ui-tooling = "1.6.0-alpha01" + +[libraries] +android-shell = { module = "com.jaredrummler:android-shell", version.ref = "android-shell" } +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activity-ktx" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx-browser = { module = "androidx.browser:browser", version.ref = "browser" } +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +androidx-core = { module = "androidx.core:core", version.ref = "core-ktx" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso-core" } +androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragment-ktx" } +androidx-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-junit" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle-viewmodel-ktx" } +androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preference-ktx" } +androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui-tooling" } +balloon = { module = "com.github.skydoves:balloon", version.ref = "balloon" } +commons-text = { module = "org.apache.commons:commons-text", version.ref = "commons-text" } +core = { module = "com.github.topjohnwu.libsu:core", version.ref = "libsuVersion" } +core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" } +firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" } +firebase-analytics = { module = "com.google.firebase:firebase-analytics", version.ref = "firebase-analytics-ktx" } +firebase-analytics-ktx = { module = "com.google.firebase:firebase-analytics-ktx", version.ref = "firebase-analytics-ktx" } +firebase-messaging = { module = "com.google.firebase:firebase-messaging", version.ref = "firebase-messaging-ktx" } +firebase-messaging-ktx = { module = "com.google.firebase:firebase-messaging-ktx", version.ref = "firebase-messaging-ktx" } +flagkit-android = { module = "com.github.murgupluoglu:flagkit-android", version.ref = "flagkit-android" } +glide = { module = "com.github.bumptech.glide:glide", version.ref = "ksp" } +google-services = { module = "com.google.gms:google-services", version.ref = "googleServices" } +gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +insetter = { module = "dev.chrisbanes.insetter:insetter", version.ref = "insetter" } +io = { module = "com.github.topjohnwu.libsu:io", version.ref = "libsuVersion" } +junit = { module = "junit:junit", version.ref = "junit" } +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" } +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-reflect" } +ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "ksp" } +legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacy-support-v4" } +material = { module = "com.google.android.material:material", version.ref = "material" } +navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation-fragment-ktx" } +navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation-fragment-ktx" } +nio = { module = "com.github.topjohnwu.libsu:nio", version.ref = "libsuVersion" } +prdownloader = { module = "de.dertyp7214:PRDownloader", version.ref = "prdownloader" } +preferencesplus = { module = "com.github.DerTyp7214:PreferencesPlus", version.ref = "preferencesplus" } +protobuf-dynamic = { module = "com.github.os72:protobuf-dynamic", version.ref = "protobuf-dynamic" } +protobuf = { module = "com.google.protobuf:protobuf-gradle-plugin", version.ref = "protobuf" } +simple-item-decoration = { module = "com.bignerdranch.android:simple-item-decoration", version.ref = "simple-item-decoration" } + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b19a890e..9d42c5b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ -#Tue Apr 18 16:25:43 CEST 2023 +#Fri Jul 14 18:21:04 CEST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-8.3-20230620222551+0000-all.zip +distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-8.4-20230714093709+0000-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists