Toolchain: Gradle 9.6 + AGP 9.4.1 (Kotlin built-in) y R8 en release

Sin plugin kotlin-android (built-in), DSL kotlin.compilerOptions, sourceSets
legacy fuera, jetifier fuera, jvmTarget 17. Release con minify+shrink y reglas
keep para WorkManager/Room de play-services-ads (reflexión rota por R8).
This commit is contained in:
kprkpr committed 2026-10-21 00:13:07 +02:00
1 parent 8683dec8da
commit 034a63bcee
5 files changed
+19 -39

No files matched your search

+11 -12
View File
@@ -1,6 +1,5 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}
// Credenciales de firma de release: viven en keystore.properties (ignorado por git).
@@ -17,7 +16,7 @@ android {
defaultConfig {
applicationId "com.jkanetwork.st.frasesdeanime"
minSdk 24
minSdk 26
targetSdk 36
// Sube automáticamente la build en cada compilacion
def versionPropsFile = file('versioncode.count')
@@ -43,9 +42,9 @@ android {
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (keystorePropsFile.exists()) {
signingConfig signingConfigs.release
}
@@ -55,16 +54,16 @@ android {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
// AGP 9: DSL kotlinOptions -> kotlin.compilerOptions (built-in Kotlin)
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
dependencies {
+6 -23
View File
@@ -1,25 +1,8 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/kprkpr/AndroidStudio/sdkLinux/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# WorkManager llega vía play-services-ads e instancia su BD Room
# (androidx.work.impl.WorkDatabase_Impl) por reflexión; el R8 optimizador
# rompe ese constructor si no se conserva.
-keep class androidx.work.** { *; }
-keep class * extends androidx.room.RoomDatabase { <init>(...); }
-dontwarn androidx.work.**
+1 -2
View File
@@ -1,5 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.10.0' apply false
id 'org.jetbrains.kotlin.android' version '2.2.10' apply false
id 'com.android.application' version '9.4.1' apply false
}
-1
View File
@@ -13,6 +13,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue Nov 14 12:27:09 CET 2017
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists