manager: Optimize build configurations

bump Gradle version and dep
This commit is contained in:
ShirkNeko
2025-09-01 16:25:25 +08:00
parent 0789632efc
commit 5586f9ce30
7 changed files with 21 additions and 25 deletions

View File

@@ -203,13 +203,6 @@ jobs:
run: | run: |
export ANDROID_HOME=/root/.android/sdk export ANDROID_HOME=/root/.android/sdk
export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH
{
echo 'org.gradle.parallel=true'
echo 'org.gradle.vfs.watch=true'
echo 'org.gradle.jvmargs=-Xmx2048m'
echo 'android.native.buildOutput=verbose'
} >> gradle.properties
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties
./gradlew clean assembleRelease ./gradlew clean assembleRelease
- name: Upload build artifact - name: Upload build artifact

View File

@@ -226,15 +226,8 @@ jobs:
cp -f ../arm64-v8a/zakozakozako ../manager/app/src/main/jniLibs/arm64-v8a/libzakozakozako.so cp -f ../arm64-v8a/zakozakozako ../manager/app/src/main/jniLibs/arm64-v8a/libzakozakozako.so
- name: Build with Gradle - name: Build with Gradle
run: | run: ./gradlew clean assembleRelease
{
echo 'org.gradle.parallel=true'
echo 'org.gradle.vfs.watch=true'
echo 'org.gradle.jvmargs=-Xmx2048m'
echo 'android.native.buildOutput=verbose'
} >> gradle.properties
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties
./gradlew clean assembleRelease
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }} if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}

View File

@@ -2,6 +2,7 @@
import com.android.build.gradle.internal.api.BaseVariantOutputImpl import com.android.build.gradle.internal.api.BaseVariantOutputImpl
import com.android.build.gradle.tasks.PackageAndroidArtifact import com.android.build.gradle.tasks.PackageAndroidArtifact
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins { plugins {
alias(libs.plugins.agp.app) alias(libs.plugins.agp.app)
@@ -41,6 +42,7 @@ android {
release { release {
isMinifyEnabled = true isMinifyEnabled = true
isShrinkResources = true isShrinkResources = true
vcsInfo.include = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
} }
/**debug { /**debug {

View File

@@ -5,21 +5,25 @@ import com.topjohnwu.superuser.io.SuFile;
import static com.sukisu.ultra.ui.util.KsuCliKt.getKpmmgrPath; import static com.sukisu.ultra.ui.util.KsuCliKt.getKpmmgrPath;
import static com.sukisu.ultra.ui.util.KsuCliKt.getSuSFSDaemonPath; import static com.sukisu.ultra.ui.util.KsuCliKt.getSuSFSDaemonPath;
import android.annotation.SuppressLint;
public class UltraToolInstall { public class UltraToolInstall {
private static final String OUTSIDE_KPMMGR_PATH = "/data/adb/ksu/bin/kpmmgr"; private static final String OUTSIDE_KPMMGR_PATH = "/data/adb/ksu/bin/kpmmgr";
private static final String OUTSIDE_SUSFSD_PATH = "/data/adb/ksu/bin/susfsd"; private static final String OUTSIDE_SUSFSD_PATH = "/data/adb/ksu/bin/susfsd";
@SuppressLint("SetWorldReadable")
@SuppressWarnings("ResultOfMethodCallIgnored")
public static void tryToInstall() { public static void tryToInstall() {
SuFile KpmmgrFile = new SuFile(OUTSIDE_KPMMGR_PATH); SuFile KpmmgrFile = new SuFile(OUTSIDE_KPMMGR_PATH);
if (KpmmgrFile.exists()) { if (KpmmgrFile.exists()) {
UltraShellHelper.CopyFileTo(getKpmmgrPath(), OUTSIDE_KPMMGR_PATH); UltraShellHelper.CopyFileTo(getKpmmgrPath(), OUTSIDE_KPMMGR_PATH);
boolean _ = KpmmgrFile.setReadable(true, false); KpmmgrFile.setReadable(true, false);
boolean _ = KpmmgrFile.setExecutable(true, false); KpmmgrFile.setExecutable(true, false);
} }
SuFile SuSFSDaemonFile = new SuFile(OUTSIDE_SUSFSD_PATH); SuFile SuSFSDaemonFile = new SuFile(OUTSIDE_SUSFSD_PATH);
if (SuSFSDaemonFile.exists()) { if (SuSFSDaemonFile.exists()) {
UltraShellHelper.CopyFileTo(getSuSFSDaemonPath(), OUTSIDE_SUSFSD_PATH); UltraShellHelper.CopyFileTo(getSuSFSDaemonPath(), OUTSIDE_SUSFSD_PATH);
boolean _ = SuSFSDaemonFile.setReadable(true, false); SuSFSDaemonFile.setReadable(true, false);
boolean _ = SuSFSDaemonFile.setExecutable(true, false); SuSFSDaemonFile.setExecutable(true, false);
} }
} }
} }

View File

@@ -1,4 +1,8 @@
android.experimental.enableNewResourceShrinker.preciseShrinking=true android.experimental.enableNewResourceShrinker.preciseShrinking=true
android.enableAppCompileTimeRClass=true android.enableAppCompileTimeRClass=true
android.useAndroidX=true android.useAndroidX=true
org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError org.gradle.jvmargs=-Xmx2048m
org.gradle.parallel=true
org.gradle.vfs.watch=true
android.r8.maxWorkers=4
android.native.buildOutput=verbose

View File

@@ -1,11 +1,11 @@
[versions] [versions]
accompanist-drawablepainter = "0.37.3" accompanist-drawablepainter = "0.37.3"
agp = "8.12.1" agp = "8.12.2"
gson = "2.13.1" gson = "2.13.1"
kotlin = "2.1.21" kotlin = "2.1.21"
ksp = "2.1.21-2.0.1" ksp = "2.1.21-2.0.1"
compose-bom = "2025.08.00" compose-bom = "2025.08.01"
lifecycle = "2.9.2" lifecycle = "2.9.3"
navigation = "2.9.3" navigation = "2.9.3"
activity-compose = "1.10.1" activity-compose = "1.10.1"
kotlinx-coroutines = "1.10.2" kotlinx-coroutines = "1.10.2"

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME