diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9abd0f2..da85e38 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,8 +7,8 @@ import java.io.FileWriter import java.util.Properties plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.agp.app) + alias(libs.plugins.kotlin) } val keystorePropertiesFile = rootProject.file("keystore.properties") @@ -20,7 +20,7 @@ val keystoreProperties = if (keystorePropertiesFile.exists() && keystoreProperti android { namespace = "io.github.a13e300.tools" - compileSdk = 34 + compileSdk = 35 signingConfigs { if (keystoreProperties != null) { create("release") { @@ -37,7 +37,7 @@ android { defaultConfig { applicationId = "io.github.a13e300.tools.stethox" minSdk = 24 - targetSdk = 34 + targetSdk = 35 versionCode = 2 versionName = "1.0.2" externalNativeBuild { @@ -226,8 +226,7 @@ task("generateDefaultOkHttp3Helper") { } dependencies { - implementation("androidx.annotation:annotation:1.7.0") - implementation("androidx.core:core-ktx:+") + implementation("androidx.annotation:annotation:1.9.1") compileOnly("de.robv.android.xposed:api:82") compileOnly(project(":hidden-api")) implementation("com.github.5ec1cff.stetho:stetho:1.0-alpha-1") diff --git a/build.gradle.kts b/build.gradle.kts index 6cb6874..86c4313 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,24 +1,7 @@ -buildscript { - - val kotlin_version by extra("1.9.10") - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle:8.2.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } -} - -allprojects { - repositories { - mavenLocal() - google() - mavenCentral() - maven("https://api.xposed.info/") - maven("https://jitpack.io") - } +plugins { + alias(libs.plugins.agp.app) apply false + alias(libs.plugins.agp.lib) apply false + alias(libs.plugins.kotlin) apply false } task("clean", type = Delete::class) { diff --git a/debugstub/build.gradle.kts b/debugstub/build.gradle.kts index 3f3a10e..f1639d3 100644 --- a/debugstub/build.gradle.kts +++ b/debugstub/build.gradle.kts @@ -1,17 +1,17 @@ plugins { - id("com.android.application") + alias(libs.plugins.agp.app) } android { namespace = "io.github.a13e300.demo" - compileSdk = 34 + compileSdk = 35 defaultConfig { // rename to the debug target // or android studio will not recognize applicationId = "io.github.a13e300.demo" minSdk = 27 - targetSdk = 34 + targetSdk = 35 versionCode = 1 versionName = "1.0" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..fa44c4b --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,8 @@ +[versions] +agp = "8.7.2" +kotlin = "2.0.20" + +[plugins] +agp-app = { id = "com.android.application", version.ref = "agp" } +agp-lib = { id = "com.android.library", version.ref = "agp" } +kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 29ece42..28504e1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Mar 09 17:29:28 CST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/hidden-api/build.gradle.kts b/hidden-api/build.gradle.kts index dc5544f..9871596 100644 --- a/hidden-api/build.gradle.kts +++ b/hidden-api/build.gradle.kts @@ -1,15 +1,14 @@ plugins { - id("com.android.library") + alias(libs.plugins.agp.lib) } android { namespace = "io.github.a13e300.hidden_api" - compileSdk = 33 + compileSdk = 35 defaultConfig { - minSdk = 16 + minSdk = 24 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") } @@ -30,9 +29,4 @@ android { dependencies { - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("com.google.android.material:material:1.9.0") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index f5afeb2..2d4c967 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,30 @@ +pluginManagement { + repositories { + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS + repositories { + mavenLocal() + google() + mavenCentral() + maven("https://jitpack.io") + maven("https://api.xposed.info/") + } +} + +rootProject.name = "StethoX" + include(":app") include(":hidden-api") include(":debugstub")