diff --git a/android/app/build.gradle b/android/app/build.gradle index 32c3bdd..2559d75 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,6 +23,7 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'dev.rikka.tools.refine' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" def keystoreProperties = new Properties() @@ -32,7 +33,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 33 + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { @@ -52,8 +53,8 @@ android { applicationId "dev.imranr.obtainium" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 23 - targetSdkVersion 33 + minSdkVersion 24 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -96,6 +97,18 @@ repositories { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - def libsuVersion = '5.2.2' - implementation "com.github.topjohnwu.libsu:core:${libsuVersion}" + + def shizuku_version = '13.1.5' + implementation "dev.rikka.shizuku:api:$shizuku_version" + implementation "dev.rikka.shizuku:provider:$shizuku_version" + + def hidden_api_version = '4.1.0' + // DO NOT UPDATE Hidden API without updating the Android tools + // and do not update Android tools without updating the whole Flutter + // (also in android/build.gradle) + implementation "dev.rikka.tools.refine:runtime:$hidden_api_version" + implementation "dev.rikka.hidden:compat:$hidden_api_version" + compileOnly "dev.rikka.hidden:stub:$hidden_api_version" + + implementation "com.github.topjohnwu.libsu:core:5.2.2" } diff --git a/android/app/src/main/kotlin/com/example/obtainium/MainActivity.kt b/android/app/src/main/kotlin/dev/imranr/obtainium/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/example/obtainium/MainActivity.kt rename to android/app/src/main/kotlin/dev/imranr/obtainium/MainActivity.kt diff --git a/android/build.gradle b/android/build.gradle index 713d7f6..288d38b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,6 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'dev.rikka.tools.refine:gradle-plugin:4.1.0' // Do not update! } }