From 8e6dd5da8416c7046717718ec28580abd9a4d004 Mon Sep 17 00:00:00 2001 From: BryanGIG Date: Sun, 8 Sep 2024 13:39:51 +0700 Subject: [PATCH] Use kotlin-compose-compiler --- app/build.gradle | 25 +++++++++++-------- .../java/com/dumper/android/dumper/Dumper.kt | 5 ++-- build.gradle | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9095180..81fffc0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id 'org.jetbrains.kotlin.plugin.compose' id 'kotlin-parcelize' id 'org.lsposed.lsplugin.jgit' } @@ -38,7 +39,6 @@ android { buildTypes { debug { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.debug } release { @@ -55,6 +55,7 @@ android { } buildFeatures { + aidl true buildConfig true viewBinding true compose true @@ -63,33 +64,35 @@ android { kotlinOptions { jvmTarget = '17' } - composeOptions { - kotlinCompilerExtensionVersion "1.5.4" - } +} + +composeCompiler { + enableStrongSkippingMode = true + reportsDestination = layout.buildDirectory.dir("compose_compiler") } dependencies { //Ui - def composeBom = platform('androidx.compose:compose-bom:2024.05.00') + def composeBom = platform("androidx.compose:compose-bom:2024.09.00") implementation composeBom androidTestImplementation composeBom implementation 'androidx.compose.material3:material3' - implementation 'androidx.compose.material:material-icons-extended:1.6.7' + implementation 'androidx.compose.material:material-icons-extended' // Android Studio Preview support implementation 'androidx.compose.ui:ui-tooling-preview' debugImplementation 'androidx.compose.ui:ui-tooling' // Integration with activities - implementation 'androidx.activity:activity-compose:1.9.0' + implementation 'androidx.activity:activity-compose:1.9.2' // Integration with ViewModels - implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0' - implementation "androidx.compose.runtime:runtime-livedata:1.6.7" + implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5" + implementation "androidx.compose.runtime:runtime-livedata:1.7.0" // Integration with Navigation - implementation 'androidx.navigation:navigation-compose:2.7.7' + implementation "androidx.navigation:navigation-compose:2.8.0" //Root - def libsuVersion = '5.2.2' + def libsuVersion = "6.0.0" implementation "com.github.topjohnwu.libsu:core:$libsuVersion" implementation "com.github.topjohnwu.libsu:service:$libsuVersion" diff --git a/app/src/main/java/com/dumper/android/dumper/Dumper.kt b/app/src/main/java/com/dumper/android/dumper/Dumper.kt index 681648e..c18578d 100644 --- a/app/src/main/java/com/dumper/android/dumper/Dumper.kt +++ b/app/src/main/java/com/dumper/android/dumper/Dumper.kt @@ -32,8 +32,9 @@ class Dumper(private val context: Context, private val config: DumperConfig, pri try { pid = Process.getProcessID(config.processName) ?: throw Exception("Process not found!") - outLog.appendLine("PID: $pid") - outLog.appendLine("FILE: $file") + outputHandler.appendLine("PROCESS: ${config.processName}") + outputHandler.appendLine("PID: $pid") + outputHandler.appendLine("FILE: ${config.file}") val mem = parseMap() ?: throw Exception("Unable to parse map!") diff --git a/build.gradle b/build.gradle index 4235442..f6103a2 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,9 @@ buildscript { maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } dependencies { - classpath 'com.android.tools.build:gradle:8.3.1' + classpath 'com.android.tools.build:gradle:8.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20" + classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.20" classpath "org.lsposed.lsplugin:jgit:1.1" // NOTE: Do not place your application dependencies here; they belong