Commit 68fbdd47 authored by vvb2060's avatar vvb2060 Committed by John Wu

Target SDK 31

parent 2cbc0483
...@@ -27,17 +27,14 @@ android { ...@@ -27,17 +27,14 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
versionName = Config.version versionName = Config.version
versionCode = Config.versionCode versionCode = Config.versionCode
ndk.abiFilters.addAll(listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")) ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
} }
buildTypes { buildTypes {
getByName("release") { getByName("release") {
isMinifyEnabled = true isMinifyEnabled = true
isShrinkResources = true isShrinkResources = true
proguardFiles( proguardFiles("proguard-rules.pro")
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
} }
} }
...@@ -52,16 +49,16 @@ android { ...@@ -52,16 +49,16 @@ android {
packagingOptions { packagingOptions {
resources { resources {
excludes.add("/META-INF/*") excludes += "/META-INF/*"
excludes.add("/org/bouncycastle/**") excludes += "/org/bouncycastle/**"
excludes.add("/kotlin/**") excludes += "/kotlin/**"
excludes.add("/kotlinx/**") excludes += "/kotlinx/**"
excludes.add("/okhttp3/**") excludes += "/okhttp3/**"
excludes.add("/*.txt") excludes += "/*.txt"
excludes.add("/*.bin") excludes += "/*.bin"
} }
jniLibs { jniLibs {
keepDebugSymbols.add("**/*.so") keepDebugSymbols += "**/*.so"
} }
} }
...@@ -119,9 +116,9 @@ val syncAssets by tasks.registering(Sync::class) { ...@@ -119,9 +116,9 @@ val syncAssets by tasks.registering(Sync::class) {
} }
filesMatching("**/util_functions.sh") { filesMatching("**/util_functions.sh") {
filter { filter {
it.replace("#MAGISK_VERSION_STUB", it.replace(
"MAGISK_VER='${Config.version}'\n" + "#MAGISK_VERSION_STUB",
"MAGISK_VER_CODE=${Config.versionCode}" "MAGISK_VER='${Config.version}'\nMAGISK_VER_CODE=${Config.versionCode}"
) )
} }
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf")) filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))
...@@ -177,11 +174,12 @@ android.applicationVariants.all { ...@@ -177,11 +174,12 @@ android.applicationVariants.all {
registerJavaGeneratingTask(genSrcTask, outSrcDir) registerJavaGeneratingTask(genSrcTask, outSrcDir)
} }
configurations.all {
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
}
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation(kotlin("stdlib"))
// Some dependencies request JDK 8 stdlib, specify manually here to prevent version mismatch
implementation(kotlin("stdlib-jdk8"))
implementation(project(":app:shared")) implementation(project(":app:shared"))
implementation("com.github.topjohnwu:jtar:1.0.0") implementation("com.github.topjohnwu:jtar:1.0.0")
...@@ -238,7 +236,7 @@ dependencies { ...@@ -238,7 +236,7 @@ dependencies {
implementation("androidx.preference:preference:1.1.1") implementation("androidx.preference:preference:1.1.1")
implementation("androidx.recyclerview:recyclerview:1.2.1") implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("androidx.fragment:fragment-ktx:1.3.6") implementation("androidx.fragment:fragment-ktx:1.3.6")
implementation("androidx.work:work-runtime-ktx:2.5.0") implementation("androidx.work:work-runtime-ktx:2.7.0-alpha05")
implementation("androidx.transition:transition:1.4.1") implementation("androidx.transition:transition:1.4.1")
implementation("androidx.core:core-ktx:1.6.0") implementation("androidx.core:core-ktx:1.6.0")
implementation("com.google.android.material:material:1.4.0") implementation("com.google.android.material:material:1.4.0")
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
# public *; # public *;
#} #}
# Parcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# Kotlin # Kotlin
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void check*(...); public static void check*(...);
......
...@@ -8,7 +8,3 @@ android { ...@@ -8,7 +8,3 @@ android {
consumerProguardFiles("proguard-rules.pro") consumerProguardFiles("proguard-rules.pro")
} }
} }
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
}
...@@ -77,10 +77,10 @@ ...@@ -77,10 +77,10 @@
<!-- Initialize WorkManager on-demand --> <!-- Initialize WorkManager on-demand -->
<provider <provider
android:name="androidx.work.impl.WorkManagerInitializer" android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.workmanager-init" android:authorities="${applicationId}.androidx-startup"
tools:node="remove" tools:node="remove">
tools:ignore="ExportedContentProvider" /> </provider>
<!-- We don't invalidate Room --> <!-- We don't invalidate Room -->
<service <service
......
...@@ -59,9 +59,8 @@ open class DownloadService : BaseDownloader() { ...@@ -59,9 +59,8 @@ open class DownloadService : BaseDownloader() {
= setContentIntent(APKInstall.installIntent(context, subject.file.toFile())) = setContentIntent(APKInstall.installIntent(context, subject.file.toFile()))
private fun Notification.Builder.setContentIntent(intent: Intent) = private fun Notification.Builder.setContentIntent(intent: Intent) =
setContentIntent( setContentIntent(PendingIntent.getActivity(context, nextInt(), intent,
PendingIntent.getActivity(context, nextInt(), intent, PendingIntent.FLAG_ONE_SHOT) PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_ONE_SHOT))
)
// --- // ---
...@@ -72,11 +71,11 @@ open class DownloadService : BaseDownloader() { ...@@ -72,11 +71,11 @@ open class DownloadService : BaseDownloader() {
fun pendingIntent(context: Context, subject: Subject): PendingIntent { fun pendingIntent(context: Context, subject: Subject): PendingIntent {
return if (Build.VERSION.SDK_INT >= 26) { return if (Build.VERSION.SDK_INT >= 26) {
PendingIntent.getForegroundService(context, nextInt(), PendingIntent.getForegroundService(context, nextInt(), intent(context, subject),
intent(context, subject), PendingIntent.FLAG_UPDATE_CURRENT) PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
} else { } else {
PendingIntent.getService(context, nextInt(), PendingIntent.getService(context, nextInt(), intent(context, subject),
intent(context, subject), PendingIntent.FLAG_UPDATE_CURRENT) PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
} }
} }
......
...@@ -12,12 +12,12 @@ buildscript { ...@@ -12,12 +12,12 @@ buildscript {
mavenCentral() mavenCentral()
} }
val vNav = "2.3.5" val vNav = "2.4.0-alpha06"
extra["vNav"] = vNav extra["vNav"] = vNav
dependencies { dependencies {
classpath("com.android.tools.build:gradle:7.0.1") classpath("com.android.tools.build:gradle:7.0.1")
classpath(kotlin("gradle-plugin", version = "1.5.21")) classpath(kotlin("gradle-plugin", version = "1.5.30"))
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${vNav}") classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${vNav}")
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
...@@ -41,16 +41,17 @@ subprojects { ...@@ -41,16 +41,17 @@ subprojects {
afterEvaluate { afterEvaluate {
if (plugins.hasPlugin("com.android.library") || if (plugins.hasPlugin("com.android.library") ||
plugins.hasPlugin("com.android.application")) { plugins.hasPlugin("com.android.application")
) {
android { android {
compileSdkVersion(30) compileSdkVersion(31)
buildToolsVersion = "30.0.3" buildToolsVersion = "31.0.0"
ndkPath = "${System.getenv("ANDROID_SDK_ROOT")}/ndk/magisk" ndkPath = "${System.getenv("ANDROID_SDK_ROOT")}/ndk/magisk"
defaultConfig { defaultConfig {
if (minSdk == null) if (minSdk == null)
minSdk = 21 minSdk = 21
targetSdk = 30 targetSdk = 31
} }
compileOptions { compileOptions {
...@@ -96,7 +97,7 @@ subprojects { ...@@ -96,7 +97,7 @@ subprojects {
} }
lintOptions { lintOptions {
disable("MissingTranslation") disable += "MissingTranslation"
} }
} }
} }
......
...@@ -15,5 +15,5 @@ gradlePlugin { ...@@ -15,5 +15,5 @@ gradlePlugin {
} }
dependencies { dependencies {
implementation("org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r") implementation("org.eclipse.jgit:org.eclipse.jgit:5.12.0.202106070339-r")
} }
This diff was suppressed by a .gitattributes entry.
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
This diff is collapsed.
...@@ -35,6 +35,5 @@ android { ...@@ -35,6 +35,5 @@ android {
} }
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation(project(":app:shared")) implementation(project(":app:shared"))
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment