diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 1ed3b87191..f17f7d678d 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { android { namespace = "app.revanced.manager.flutter" - compileSdk = 34 + compileSdk = 35 ndkVersion = "27.0.12077973" compileOptions { @@ -24,9 +24,11 @@ android { defaultConfig { applicationId = "app.revanced.manager.flutter" minSdk = 26 - targetSdk = 34 + targetSdk = 35 versionCode = flutter.versionCode versionName = flutter.versionName + + resValue("string", "app_name", "ReVanced Manager") } buildTypes { @@ -37,6 +39,7 @@ android { signingConfig = signingConfigs["debug"] ndk.abiFilters += setOf("armeabi-v7a", "arm64-v8a", "x86_64") + setProperty("archivesBaseName", "revanced-manager-v${flutter.versionName}") } @@ -52,14 +55,16 @@ android { keyAlias = System.getenv("KEYSTORE_ENTRY_ALIAS") keyPassword = System.getenv("KEYSTORE_ENTRY_PASSWORD") } + + resValue("string", "app_name", "ReVanced Manager") } else { - resValue("string", "app_name", "ReVanced Manager (Debug)") + applicationIdSuffix = ".debug" signingConfig = signingConfigs["debug"] - } - resValue("string", "app_name", "ReVanced Manager") + resValue("string", "app_name", "ReVanced Manager (Debug)") + } } debug { @@ -80,6 +85,7 @@ android { } } + flutter { source = "../.." } diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt index 6acd083a3a..4290cbcc31 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt @@ -3,7 +3,6 @@ package app.revanced.manager.flutter import android.app.Activity import android.content.Context import android.content.Intent -import android.content.pm.PackageInfo import android.content.pm.PackageManager import android.os.Bundle import android.util.Base64 @@ -17,9 +16,8 @@ import java.security.MessageDigest class ExportSettingsActivity : Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val callingPackageName = getCallingPackage()!! - if (getFingerprint(callingPackageName) == getFingerprint(getPackageName())) { + if (getFingerprint(callingPackage!!) == getFingerprint(packageName)) { // Create JSON Object val json = JSONObject() @@ -64,7 +62,7 @@ class ExportSettingsActivity : Activity() { fun getFingerprint(packageName: String): String { // Get the signature of the app that matches the package name val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES) - val signature = packageInfo.signatures[0] + val signature = packageInfo.signatures!![0] // Get the raw certificate data val rawCert = signature.toByteArray() diff --git a/android/build.gradle.kts b/android/build.gradle.kts index b454af29f4..d0a3415f4d 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -1,4 +1,5 @@ import com.android.build.api.dsl.CommonExtension +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile allprojects { repositories { @@ -17,6 +18,14 @@ allprojects { layout.buildDirectory = File("../build") +project(":screenshot_callback") { + tasks.withType().configureEach { + kotlinOptions { + jvmTarget = "17" + } + } +} + subprojects { afterEvaluate { extensions.findByName("android")?.let { diff --git a/android/gradle.properties b/android/gradle.properties index 4df72eba53..7676bdfcbc 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -3,6 +3,5 @@ android.useAndroidX=true org.gradle.parallel=true org.gradle.daemon=true org.gradle.caching=true -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index bb8eca7a2c..352a5400be 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] revanced-patcher = "21.0.0" revanced-library = "3.0.2" -desugar_jdk_libs = "2.1.2" +desugar_jdk_libs = "2.1.3" [libraries] revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 9444e03e66..3a247b837c 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -17,7 +17,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.5.0" apply false + id("com.android.application") version "8.7.2" apply false id("org.jetbrains.kotlin.android") version "2.0.20" apply false }