From 56ea196f8b4580cb948285588276ea2e6b30159c Mon Sep 17 00:00:00 2001 From: sitou Date: Fri, 25 Jul 2025 11:25:21 +0900 Subject: [PATCH] =?UTF-8?q?kotlin,agp=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=A2=E3=83=83=E3=83=97=E3=80=81=E3=82=AF?= =?UTF-8?q?=E3=83=A9=E3=83=83=E3=82=B7=E3=83=A5=E9=98=B2=E6=AD=A2=E3=81=AE?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 6 ++-- app/proguard-rules.pro | 41 +++++++++++++++++++++++- build.gradle | 5 +-- gradle.properties | 2 -- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 48 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d7bcf71..05b0be5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,7 @@ apply plugin: 'androidx.navigation.safeargs' apply plugin: 'kotlin-kapt' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.android.gms.oss-licenses-plugin' +apply plugin: 'com.google.devtools.ksp' android { compileSdk 36 @@ -11,7 +12,7 @@ android { applicationId "jp.atled.agileworks" minSdkVersion 24 targetSdk 36 - versionCode 7 + versionCode 8 versionName "1.1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -25,6 +26,7 @@ android { buildFeatures { dataBinding = true viewBinding = true + buildConfig = true } compileOptions { sourceCompatibility = 17 @@ -87,7 +89,7 @@ dependencies { implementation "com.squareup.moshi:moshi:$moshi_version" implementation "com.squareup.moshi:moshi-kotlin:$moshi_version" - kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version" + ksp "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version" implementation "net.openid:appauth:0.7.1" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 04e5470..af763b7 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -29,4 +29,43 @@ -dontwarn org.conscrypt.ConscryptHostnameVerifier -dontwarn org.openjsse.javax.net.ssl.SSLParameters -dontwarn org.openjsse.javax.net.ssl.SSLSocket --dontwarn org.openjsse.net.ssl.OpenJSSE \ No newline at end of file +-dontwarn org.openjsse.net.ssl.OpenJSSE + +#以下クラッシュ防止のためのルール +# --- Moshi --- +-keep class com.squareup.moshi.** { *; } +-keepclassmembers class * { + @com.squareup.moshi.* ; +} + +# --- Retrofit & OkHttp --- +-keep class retrofit2.** { *; } +-keep class okhttp3.** { *; } + +# --- Kotlin Reflect --- +-keep class kotlin.reflect.** { *; } + +# --- DataBinding / ViewBinding --- +-keep class androidx.databinding.** { *; } +-keep class **.databinding.*Binding { *; } +-keep class **.BR { *; } + +# --- Firebase / Google Play Services --- +-keep class com.google.firebase.** { *; } +-keep class com.google.android.gms.** { *; } + +# --- Navigation Component --- +-keep class androidx.navigation.** { *; } + +# --- ZXing --- +-keep class com.journeyapps.barcodescanner.** { *; } +-keep class com.google.zxing.** { *; } + +# --- Picasso --- +-keep class com.squareup.picasso.** { *; } + +# --- AppAuth --- +-keep class net.openid.appauth.** { *; } + +# --- その他 --- +-keepattributes SourceFile,LineNumberTable diff --git a/build.gradle b/build.gradle index 3228a51..2c9f4be 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext{ - kotlin_version = '1.8.20' + kotlin_version = '2.2.0' nav_version = '2.5.0' workVersion = '2.7.0' anko_version = '0.10.8' @@ -22,11 +22,12 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.3' + classpath 'com.android.tools.build:gradle:8.11.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" classpath "com.google.gms:google-services:$google_services_version" classpath 'com.google.android.gms:oss-licenses-plugin:0.10.4' + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.2.0-2.0.2" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle.properties b/gradle.properties index ae0c238..6c03d80 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,6 +18,4 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true org.gradle.warning.mode=all -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false -android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6dbf5da..6cc3781 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,4 +4,4 @@ distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists #distributionUrl=gradle-7.0.2-all.zip -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip -- GitLab