From 597ef3812cce4d867e2e9060d24168b678b55b0f Mon Sep 17 00:00:00 2001 From: rikaaa0928 Date: Thu, 2 Jan 2025 16:37:17 +0800 Subject: [PATCH] minfy --- app/build.gradle.kts | 7 ++++++- app/proguard-rules.pro | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8517896..55cf878 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -27,7 +27,8 @@ android { buildTypes { release { - isMinifyEnabled = false + isMinifyEnabled = true + isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" @@ -46,6 +47,10 @@ android { kotlinOptions { jvmTarget = "17" } + + kotlin { + jvmToolchain(17) + } } dependencies { diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 31d225b..1dd7b72 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -20,4 +20,15 @@ # hide the original source file name. #-renamesourcefileattribute SourceFile --keep, includedescriptorclasses class org.rustls.platformverifier.** { *; } \ No newline at end of file +-keep, includedescriptorclasses class org.rustls.platformverifier.** { *; } + +-keep class uniffi.** { *; } +-keep class com.sun.jna.** { *; } +-keep class java.awt.Component { *; } +-keep class java.awt.GraphicsEnvironment { *; } +-keep class java.awt.HeadlessException { *; } +-keep class java.awt.Window { *; } +-dontwarn java.awt.Component +-dontwarn java.awt.GraphicsEnvironment +-dontwarn java.awt.HeadlessException +-dontwarn java.awt.Window \ No newline at end of file