From 66f407b69f4e2548a344ac847e5159186275f373 Mon Sep 17 00:00:00 2001 From: YuKongA <70465933+YuKongA@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:03:58 +0800 Subject: [PATCH] Update: AGP 8.1.3 --- app/build.gradle.kts | 29 +++++++------- build.gradle.kts | 11 +++--- gradle/libs.versions.toml | 17 ++++++++ .../sweet-dependency-config.yaml | 39 ------------------- gradle/wrapper/gradle-wrapper.properties | 2 + settings.gradle.kts | 13 +++++-- 6 files changed, 47 insertions(+), 64 deletions(-) create mode 100644 gradle/libs.versions.toml delete mode 100644 gradle/sweet-dependency/sweet-dependency-config.yaml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4df274c..0832f2b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -2,9 +2,10 @@ import com.android.build.gradle.internal.api.BaseVariantOutputImpl import java.io.ByteArrayOutputStream import java.util.Properties +@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed plugins { - autowire(libs.plugins.com.android.application) - autowire(libs.plugins.org.jetbrains.kotlin.android) + alias(libs.plugins.androidApplication) + alias(libs.plugins.kotlinAndroid) } android { @@ -67,6 +68,12 @@ android { } kotlinOptions { jvmTarget = JavaVersion.VERSION_17.majorVersion + freeCompilerArgs = listOf( + "-Xno-param-assertions", + "-Xno-call-assertions", + "-Xno-receiver-assertions", + "-language-version=2.0", + ) } } @@ -98,18 +105,10 @@ fun getVersionName(): String { return getGitDescribe() } -kotlin { - sourceSets.all { - languageSettings { - languageVersion = "2.0" - } - } -} - dependencies { - compileOnly(de.robv.android.xposed.api) - implementation(com.github.kyuubiran.ezXHelper) - implementation(org.luckypray.dexkit) - implementation(org.lsposed.hiddenapibypass.hiddenapibypass) - implementation(projects.blockmiui) + compileOnly(libs.xposed.api) + implementation(project(":blockmiui")) + implementation(libs.ezXHelper) + implementation(libs.dexKit) + implementation(libs.hiddenapibypass) } diff --git a/build.gradle.kts b/build.gradle.kts index 941d566..20d87a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,7 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed plugins { - autowire(libs.plugins.com.android.application) apply false - autowire(libs.plugins.org.jetbrains.kotlin.android) apply false + alias(libs.plugins.androidApplication) apply false + alias(libs.plugins.kotlinAndroid) apply false } - -tasks.register("clean", Delete::class) { - delete(rootProject.layout.buildDirectory) -} \ No newline at end of file +true // Needed to make the Suppress annotation work for the plugins block \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..3d74656 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,17 @@ +[versions] +agp = "8.1.3" +dexKit = "2.0.0-rc7" +ezXHelper = "2.0.8" +xposed-api = "82" +kotlin = "1.9.20" +hiddenapibypass = "4.3" + +[libraries] +dexKit = { module = "org.luckypray:dexkit", version.ref = "dexKit" } +ezXHelper = { module = "com.github.kyuubiran:EzXHelper", version.ref = "ezXHelper" } +xposed-api = { module = "de.robv.android.xposed:api", version.ref = "xposed-api" } +hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version.ref = "hiddenapibypass" } + +[plugins] +androidApplication = { id = "com.android.application", version.ref = "agp" } +kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } diff --git a/gradle/sweet-dependency/sweet-dependency-config.yaml b/gradle/sweet-dependency/sweet-dependency-config.yaml deleted file mode 100644 index b0167cf..0000000 --- a/gradle/sweet-dependency/sweet-dependency-config.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# SweetDependency project configuration file -# You can adjust your custom configuration to your liking here -# You can visit https://github.com/HighCapable/SweetDependency for more help -# -# SweetDependency 项目配置文件 -# 你可以在这里调整你喜欢的自定义配置 -# 你可以前往 https://github.com/HighCapable/SweetDependency 以获得更多帮助 - -preferences: - autowire-on-sync-mode: UPDATE_OPTIONAL_DEPENDENCIES - repositories-mode: FAIL_ON_PROJECT_REPOS - -repositories: - gradle-plugin-portal: - scope: PLUGINS - google: - maven-central: - maven-xposed: - url: https://api.xposed.info/ - -plugins: - com.android.application: - version: 8.1.2 - org.jetbrains.kotlin.android: - version: 1.9.10 - -libraries: - de.robv.android.xposed: - api: - version: 82 - com.github.kyuubiran: - EzXHelper: - version: 2.0.8 - org.luckypray: - dexkit: - version: 2.0.0-rc7 - org.lsposed.hiddenapibypass: - hiddenapibypass: - version: 4.3 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 16e216b..58301a6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,5 +2,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index d4026a4..4bb758b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,16 +1,21 @@ -enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +@file:Suppress("UnstableApiUsage") pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() - maven("https://api.xposed.info/") } } -plugins { - id("com.highcapable.sweetdependency") version "1.0.3" +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + gradlePluginPortal() + maven("https://api.xposed.info/") + } } rootProject.name = ("HyperOS_XXL")