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

Target SDK 31

parent 2cbc0483
......@@ -27,17 +27,14 @@ android {
vectorDrawables.useSupportLibrary = true
versionName = Config.version
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 {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
proguardFiles("proguard-rules.pro")
}
}
......@@ -52,16 +49,16 @@ android {
packagingOptions {
resources {
excludes.add("/META-INF/*")
excludes.add("/org/bouncycastle/**")
excludes.add("/kotlin/**")
excludes.add("/kotlinx/**")
excludes.add("/okhttp3/**")
excludes.add("/*.txt")
excludes.add("/*.bin")
excludes += "/META-INF/*"
excludes += "/org/bouncycastle/**"
excludes += "/kotlin/**"
excludes += "/kotlinx/**"
excludes += "/okhttp3/**"
excludes += "/*.txt"
excludes += "/*.bin"
}
jniLibs {
keepDebugSymbols.add("**/*.so")
keepDebugSymbols += "**/*.so"
}
}
......@@ -119,9 +116,9 @@ val syncAssets by tasks.registering(Sync::class) {
}
filesMatching("**/util_functions.sh") {
filter {
it.replace("#MAGISK_VERSION_STUB",
"MAGISK_VER='${Config.version}'\n" +
"MAGISK_VER_CODE=${Config.versionCode}"
it.replace(
"#MAGISK_VERSION_STUB",
"MAGISK_VER='${Config.version}'\nMAGISK_VER_CODE=${Config.versionCode}"
)
}
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))
......@@ -177,11 +174,12 @@ android.applicationVariants.all {
registerJavaGeneratingTask(genSrcTask, outSrcDir)
}
configurations.all {
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
}
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("com.github.topjohnwu:jtar:1.0.0")
......@@ -238,7 +236,7 @@ dependencies {
implementation("androidx.preference:preference:1.1.1")
implementation("androidx.recyclerview:recyclerview:1.2.1")
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.core:core-ktx:1.6.0")
implementation("com.google.android.material:material:1.4.0")
......
......@@ -16,6 +16,11 @@
# public *;
#}
# Parcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# Kotlin
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void check*(...);
......
......@@ -8,7 +8,3 @@ android {
consumerProguardFiles("proguard-rules.pro")
}
}
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
}
......@@ -77,10 +77,10 @@
<!-- Initialize WorkManager on-demand -->
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"
tools:ignore="ExportedContentProvider" />
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove">
</provider>
<!-- We don't invalidate Room -->
<service
......
......@@ -59,9 +59,8 @@ open class DownloadService : BaseDownloader() {
= setContentIntent(APKInstall.installIntent(context, subject.file.toFile()))
private fun Notification.Builder.setContentIntent(intent: Intent) =
setContentIntent(
PendingIntent.getActivity(context, nextInt(), intent, PendingIntent.FLAG_ONE_SHOT)
)
setContentIntent(PendingIntent.getActivity(context, nextInt(), intent,
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_ONE_SHOT))
// ---
......@@ -72,11 +71,11 @@ open class DownloadService : BaseDownloader() {
fun pendingIntent(context: Context, subject: Subject): PendingIntent {
return if (Build.VERSION.SDK_INT >= 26) {
PendingIntent.getForegroundService(context, nextInt(),
intent(context, subject), PendingIntent.FLAG_UPDATE_CURRENT)
PendingIntent.getForegroundService(context, nextInt(), intent(context, subject),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
} else {
PendingIntent.getService(context, nextInt(),
intent(context, subject), PendingIntent.FLAG_UPDATE_CURRENT)
PendingIntent.getService(context, nextInt(), intent(context, subject),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
}
}
......
......@@ -12,12 +12,12 @@ buildscript {
mavenCentral()
}
val vNav = "2.3.5"
val vNav = "2.4.0-alpha06"
extra["vNav"] = vNav
dependencies {
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}")
// NOTE: Do not place your application dependencies here; they belong
......@@ -41,16 +41,17 @@ subprojects {
afterEvaluate {
if (plugins.hasPlugin("com.android.library") ||
plugins.hasPlugin("com.android.application")) {
plugins.hasPlugin("com.android.application")
) {
android {
compileSdkVersion(30)
buildToolsVersion = "30.0.3"
compileSdkVersion(31)
buildToolsVersion = "31.0.0"
ndkPath = "${System.getenv("ANDROID_SDK_ROOT")}/ndk/magisk"
defaultConfig {
if (minSdk == null)
minSdk = 21
targetSdk = 30
targetSdk = 31
}
compileOptions {
......@@ -96,7 +97,7 @@ subprojects {
}
lintOptions {
disable("MissingTranslation")
disable += "MissingTranslation"
}
}
}
......
......@@ -15,5 +15,5 @@ gradlePlugin {
}
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
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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 {
}
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
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