From 3238fcdae7162497efe44e31fbfd1045f585091d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Mi=C5=9B?= Date: Mon, 17 Jul 2023 14:27:19 +0200 Subject: [PATCH] build: updates (#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Java base to 17 * update Kotlin to 1.8.22 * update Bouncycastle * update all dependencies * follow the manifest on jni libs packaging * enhance app optimization by specifying resource configurations, excluding dependencies info and unnessesary files * Remove obsolete SDK check as we are already using minSdk 26 Signed-off-by: Patryk Miś --- app/build.gradle.kts | 36 +++++++++++++------ .../ic_launcher.xml | 0 gradle/libs.versions.toml | 10 +++--- 3 files changed, 31 insertions(+), 15 deletions(-) rename app/src/main/res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml (100%) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0a288773..9f3b88c4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -3,7 +3,7 @@ plugins { alias(libs.plugins.kotlin.android) alias(libs.plugins.devtools) id("kotlin-parcelize") - kotlin("plugin.serialization") version "1.8.21" + kotlin("plugin.serialization") version "1.8.22" } android { @@ -17,6 +17,9 @@ android { targetSdk = 33 versionCode = 1 versionName = "0.0.1" + resourceConfigurations.addAll(listOf( + "en", + )) vectorDrawables.useSupportLibrary = true } @@ -30,14 +33,27 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + dependenciesInfo { + includeInApk = false + includeInBundle = false + } packaging { - resources { - excludes += "/prebuilt/**" - excludes += "META-INF/DEPENDENCIES" + resources.excludes.addAll(listOf( + "/prebuilt/**", + "META-INF/DEPENDENCIES", + "META-INF/**.version", + "DebugProbesKt.bin", + "kotlin-tooling-metadata.json", + "kotlin/**.kotlin_builtins", + "org/bouncycastle/pqc/**.properties", + "org/bouncycastle/x509/**.properties", + } + jniLibs { + useLegacyPackaging = true } } @@ -46,16 +62,16 @@ android { } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } buildFeatures.compose = true - composeOptions.kotlinCompilerExtensionVersion = "1.4.7" + composeOptions.kotlinCompilerExtensionVersion = "1.4.8" } kotlin { - jvmToolchain(11) + jvmToolchain(17) } dependencies { @@ -105,7 +121,7 @@ dependencies { // Signing implementation(libs.apksign) - implementation(libs.bcpkix.jdk15on) + implementation(libs.bcpkix.jdk18on) // Koin implementation(libs.koin.android) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to app/src/main/res/mipmap-anydpi/ic_launcher.xml diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4bdb800d..76e201e0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,16 +13,16 @@ collection = "0.3.5" room-version = "2.5.2" patcher = "11.0.4" apksign = "8.0.2" -bcpkix-jdk15on = "1.70" +bcpkix-jdk18on = "1.75" koin-version = "3.4.2" koin-version-compose = "3.4.5" reimagined-navigation = "1.4.0" ktor = "2.3.2" markdown = "0.4.1" androidGradlePlugin = "8.0.2" -kotlinGradlePlugin = "1.8.21" -devToolsGradlePlugin = "1.8.21-1.0.11" -aboutLibrariesGradlePlugin = "10.8.0" +kotlinGradlePlugin = "1.8.22" +devToolsGradlePlugin = "1.8.22-1.0.11" +aboutLibrariesGradlePlugin = "10.8.2" coil = "2.4.0" app-icon-loader-coil = "1.5.0" skrapeit = "1.2.1" @@ -71,7 +71,7 @@ patcher = { group = "app.revanced", name = "revanced-patcher", version.ref = "pa # Signing apksign = { group = "com.android.tools.build", name = "apksig", version.ref = "apksign" } -bcpkix-jdk15on = { group = "org.bouncycastle", name = "bcpkix-jdk15on", version.ref = "bcpkix-jdk15on" } +bcpkix-jdk18on = { group = "org.bouncycastle", name = "bcpkix-jdk18on", version.ref = "bcpkix-jdk18on" } # Koin koin-android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin-version" }