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