Update AGP

This commit is contained in:
topjohnwu 2023-02-20 01:03:35 -08:00
parent 4ba365565f
commit 9b1e173373
4 changed files with 17 additions and 13 deletions

View File

@ -39,9 +39,10 @@ android {
buildFeatures { buildFeatures {
dataBinding = true dataBinding = true
aidl = true
} }
packagingOptions { packaging {
resources { resources {
excludes += "/META-INF/*" excludes += "/META-INF/*"
excludes += "/META-INF/versions/**" excludes += "/META-INF/versions/**"
@ -57,10 +58,6 @@ android {
keepDebugSymbols += "**/*.so" keepDebugSymbols += "**/*.so"
} }
} }
kotlin {
jvmToolchain(17)
}
} }
setupApp() setupApp()

View File

@ -9,10 +9,6 @@
<uses-permission android:name="android.permission.HIDE_OVERLAY_WINDOWS" /> <uses-permission android:name="android.permission.HIDE_OVERLAY_WINDOWS" />
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" /> <uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage"
tools:node="remove" />
<uses-permission <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" android:maxSdkVersion="29"

View File

@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
`kotlin-dsl` `kotlin-dsl`
} }
@ -19,7 +17,7 @@ gradlePlugin {
dependencies { dependencies {
implementation(kotlin("gradle-plugin", "1.8.0")) implementation(kotlin("gradle-plugin", "1.8.0"))
implementation("com.android.tools.build:gradle:7.4.1") implementation("com.android.tools.build:gradle:8.0.0-beta03")
implementation("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3") implementation("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3")
implementation("org.lsposed.lsparanoid:gradle-plugin:0.5.0") implementation("org.lsposed.lsparanoid:gradle-plugin:0.5.0")
implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") implementation("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r")

View File

@ -11,11 +11,11 @@ import org.gradle.api.Action
import org.gradle.api.JavaVersion import org.gradle.api.JavaVersion
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionAware import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.Delete import org.gradle.api.tasks.Delete
import org.gradle.api.tasks.StopExecutionException import org.gradle.api.tasks.StopExecutionException
import org.gradle.api.tasks.Sync import org.gradle.api.tasks.Sync
import org.gradle.kotlin.dsl.* import org.gradle.kotlin.dsl.*
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
import java.io.ByteArrayInputStream import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
@ -38,6 +38,11 @@ private fun BaseExtension.kotlinOptions(configure: Action<KotlinJvmOptions>) =
configure.execute(it as KotlinJvmOptions) configure.execute(it as KotlinJvmOptions)
} }
private fun BaseExtension.kotlin(configure: Action<KotlinAndroidProjectExtension>) =
(this as ExtensionAware).extensions.findByName("kotlin")?.let {
configure.execute(it as KotlinAndroidProjectExtension)
}
private val Project.android: BaseAppModuleExtension private val Project.android: BaseAppModuleExtension
get() = extensions["android"] as BaseAppModuleExtension get() = extensions["android"] as BaseAppModuleExtension
@ -60,6 +65,10 @@ fun Project.setupCommon() {
kotlinOptions { kotlinOptions {
jvmTarget = "17" jvmTarget = "17"
} }
kotlin {
jvmToolchain(17)
}
} }
} }
@ -130,6 +139,10 @@ private fun Project.setupAppCommon() {
dependenciesInfo { dependenciesInfo {
includeInApk = false includeInApk = false
} }
buildFeatures {
buildConfig = true
}
} }
android.applicationVariants.all { android.applicationVariants.all {