From b1af17fd02dd8f338846449429a3844c3fa31dcb Mon Sep 17 00:00:00 2001 From: Nullptr Date: Wed, 29 Mar 2023 23:36:46 +0800 Subject: [PATCH] bump to 2.0 --- app/build.gradle.kts | 26 +++++++++++++------------- build.gradle.kts | 11 ----------- gradle/libs.versions.toml | 22 ++++++++++++++++++++++ settings.gradle.kts | 5 ----- 4 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index eafcf40..6d6cbf0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,10 +4,10 @@ import java.nio.file.Paths import java.util.Properties plugins { - id("com.android.application") - id("org.lsposed.lsparanoid") - id("org.lsposed.lsplugin.apktransform") - kotlin("android") + alias(libs.plugins.agp.app) + alias(libs.plugins.kotlin) + alias(libs.plugins.lsparanoid) + alias(libs.plugins.lsplugin.apktransform) } val properties = Properties() @@ -27,7 +27,7 @@ fun String.execute(currentWorkingDir: File = file("./")): String { return String(byteOut.toByteArray()).trim() } -val verName = "1.9" +val verName = "2.0" val gitCommitCount = "git rev-list HEAD --count".execute().toInt() val gitCommitHash = "git rev-parse --verify --short HEAD".execute() @@ -128,14 +128,14 @@ android { } dependencies { - compileOnly("de.robv.android.xposed:api:82") - implementation("androidx.documentfile:documentfile:1.0.1") - implementation("androidx.recyclerview:recyclerview:1.2.1") - implementation("com.github.kyuubiran:EzXHelper:2.0.0-RC7") - implementation("com.tencent:mmkv:1.2.15") - implementation("dev.rikka.ndk.thirdparty:cxx:1.2.0") - implementation("dev.rikka.ndk.thirdparty:nativehelper:1.0.0") - implementation("org.luckypray:DexKit:1.1.2") + compileOnly(libs.legacy.xposed.api) + implementation(libs.androidx.documentfile) + implementation(libs.androidx.recyclerview) + implementation(libs.dexkit) + implementation(libs.ezxhelper) + implementation(libs.mmkv) + implementation(libs.ndk.cxx) + implementation(libs.ndk.nativehelper) } val adbExecutable: String = androidComponents.sdkComponents.adb.get().asFile.absolutePath diff --git a/build.gradle.kts b/build.gradle.kts index bd2fd5d..ee44c38 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,14 +1,3 @@ -buildscript { - repositories { - google() - mavenCentral() - maven("https://jitpack.io") - } - dependencies { - classpath("com.android.tools.build:gradle:7.4.2") - } -} - tasks.register("clean") { delete(rootProject.buildDir) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..bac3284 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,22 @@ +[versions] +agp = "7.4.2" +kotlin = "1.8.10" + +[plugins] +agp-app = { id = "com.android.application", version.ref = "agp" } +kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +lsparanoid = { id = "org.lsposed.lsparanoid", version = "0.5.2" } +lsplugin-apktransform = { id = "org.lsposed.lsplugin.apktransform", version = "1.2" } + +[libraries] +legacy-xposed-api = { group = "de.robv.android.xposed", name = "api", version = "82" } +androidx-documentfile = { group = "androidx.documentfile", name = "documentfile", version = "1.0.1" } +androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version = "1.3.0" } +dexkit = { group = "org.luckypray", name = "DexKit", version = "1.1.2" } +ezxhelper = { group = "com.github.kyuubiran", name = "EzXHelper", version = "2.0.0-RC7" } +mmkv = { group = "com.tencent", name = "mmkv", version = "1.2.15" } +ndk-cxx = { group = "dev.rikka.ndk.thirdparty", name = "cxx", version = "1.2.0" } +ndk-nativehelper = { group = "dev.rikka.ndk.thirdparty", name = "nativehelper", version = "1.0.0" } + +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.6.4" } diff --git a/settings.gradle.kts b/settings.gradle.kts index ee892bc..1a9fd9a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -13,11 +13,6 @@ pluginManagement { google() mavenCentral() } - plugins { - id("org.jetbrains.kotlin.android") version "1.8.10" - id("org.lsposed.lsparanoid") version "0.5.2" - id("org.lsposed.lsplugin.apktransform") version "1.2" - } } rootProject.name = "TwiFucker"