Refine gradle scripts
This commit is contained in:
parent
559f2860dd
commit
b069da0323
|
|
@ -19,21 +19,25 @@
|
||||||
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
id("androidx.navigation.safeargs")
|
alias(libs.plugins.nav.safeargs)
|
||||||
id("dev.rikka.tools.autoresconfig")
|
alias(libs.plugins.autoresconfig)
|
||||||
id("dev.rikka.tools.materialthemebuilder")
|
alias(libs.plugins.materialthemebuilder)
|
||||||
id("org.lsposed.lsplugin.resopt")
|
alias(libs.plugins.lsplugin.resopt)
|
||||||
|
alias(libs.plugins.lsplugin.apksign)
|
||||||
|
}
|
||||||
|
|
||||||
|
apksign {
|
||||||
|
storeFileProperty = "androidStoreFile"
|
||||||
|
storePasswordProperty = "androidStorePassword"
|
||||||
|
keyAliasProperty = "androidKeyAlias"
|
||||||
|
keyPasswordProperty = "androidKeyPassword"
|
||||||
}
|
}
|
||||||
|
|
||||||
val defaultManagerPackageName: String by rootProject.extra
|
val defaultManagerPackageName: String by rootProject.extra
|
||||||
|
|
||||||
val androidStoreFile: String? by rootProject
|
|
||||||
val androidStorePassword: String? by rootProject
|
|
||||||
val androidKeyAlias: String? by rootProject
|
|
||||||
val androidKeyPassword: String? by rootProject
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
|
|
@ -58,29 +62,11 @@ android {
|
||||||
|
|
||||||
dependenciesInfo.includeInApk = false
|
dependenciesInfo.includeInApk = false
|
||||||
|
|
||||||
signingConfigs {
|
|
||||||
create("config") {
|
|
||||||
androidStoreFile?.also {
|
|
||||||
storeFile = rootProject.file(it)
|
|
||||||
storePassword = androidStorePassword
|
|
||||||
keyAlias = androidKeyAlias
|
|
||||||
keyPassword = androidKeyPassword
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
signingConfigs.named("config").get().also {
|
release {
|
||||||
debug {
|
isMinifyEnabled = true
|
||||||
if (it.storeFile?.exists() == true) signingConfig = it
|
isShrinkResources = true
|
||||||
}
|
proguardFiles("proguard-rules.pro")
|
||||||
release {
|
|
||||||
signingConfig = if (it.storeFile?.exists() == true) it
|
|
||||||
else signingConfigs.named("debug").get()
|
|
||||||
isMinifyEnabled = true
|
|
||||||
isShrinkResources = true
|
|
||||||
proguardFiles("proguard-rules.pro")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,46 +123,41 @@ materialThemeBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
val glideVersion = "4.15.0"
|
annotationProcessor(libs.glide.compiler)
|
||||||
val navVersion: String by project
|
implementation(libs.androidx.activity)
|
||||||
val kotlinVersion: String by project
|
implementation(libs.androidx.browser)
|
||||||
annotationProcessor("com.github.bumptech.glide:compiler:$glideVersion")
|
implementation(libs.androidx.constraintlayout)
|
||||||
implementation("androidx.activity:activity:1.6.1")
|
implementation(libs.androidx.core)
|
||||||
implementation("androidx.browser:browser:1.4.0")
|
implementation(libs.androidx.fragment)
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation(libs.androidx.navigation.fragment)
|
||||||
implementation("androidx.core:core:1.9.0")
|
implementation(libs.androidx.navigation.ui)
|
||||||
implementation("androidx.fragment:fragment:1.5.5")
|
implementation(libs.androidx.preference)
|
||||||
implementation("androidx.navigation:navigation-fragment:$navVersion")
|
implementation(libs.androidx.recyclerview)
|
||||||
implementation("androidx.navigation:navigation-ui:$navVersion")
|
implementation(libs.androidx.swiperefreshlayout)
|
||||||
implementation("androidx.preference:preference:1.2.0")
|
implementation(libs.glide)
|
||||||
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
implementation(libs.material)
|
||||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
|
implementation(libs.gson)
|
||||||
implementation("com.github.bumptech.glide:glide:$glideVersion")
|
implementation(libs.okhttp)
|
||||||
implementation("com.google.android.material:material:1.8.0")
|
implementation(libs.okhttp.dnsoverhttps)
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation(libs.okhttp.logging.interceptor)
|
||||||
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))
|
implementation(libs.rikkax.appcompat)
|
||||||
implementation("com.squareup.okhttp3:okhttp")
|
implementation(libs.rikkax.core)
|
||||||
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps")
|
implementation(libs.rikkax.insets)
|
||||||
implementation("com.squareup.okhttp3:logging-interceptor")
|
implementation(libs.rikkax.material)
|
||||||
implementation("dev.rikka.rikkax.appcompat:appcompat:1.5.0.1")
|
implementation(libs.rikkax.material.preference)
|
||||||
implementation("dev.rikka.rikkax.core:core:1.4.1")
|
implementation(libs.rikkax.preference)
|
||||||
implementation("dev.rikka.rikkax.insets:insets:1.3.0")
|
implementation(libs.rikkax.recyclerview)
|
||||||
implementation("dev.rikka.rikkax.material:material:2.5.1")
|
implementation(libs.rikkax.widget.borderview)
|
||||||
implementation("dev.rikka.rikkax.material:material-preference:2.0.0")
|
implementation(libs.rikkax.widget.mainswitchbar)
|
||||||
implementation("dev.rikka.rikkax.preference:simplemenu-preference:1.0.3")
|
implementation(libs.rikkax.layoutinflater)
|
||||||
implementation("dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.3.1")
|
implementation(libs.appiconloader)
|
||||||
implementation("dev.rikka.rikkax.widget:borderview:1.1.0")
|
implementation(libs.hiddenapibypass)
|
||||||
implementation("dev.rikka.rikkax.widget:mainswitchbar:1.0.2")
|
implementation(libs.kotlin.stdlib)
|
||||||
implementation("dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0")
|
implementation(libs.kotlinx.coroutines.core)
|
||||||
implementation("me.zhanghai.android.appiconloader:appiconloader:1.5.0")
|
|
||||||
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
|
|
||||||
implementation(kotlin("stdlib", kotlinVersion))
|
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
|
||||||
implementation(projects.services.managerService)
|
implementation(projects.services.managerService)
|
||||||
|
|
||||||
val appCenter = "5.0.0"
|
debugImplementation(libs.appcenter.analytics)
|
||||||
debugImplementation("com.microsoft.appcenter:appcenter-crashes:${appCenter}")
|
debugImplementation(libs.appcenter.crashes)
|
||||||
debugImplementation("com.microsoft.appcenter:appcenter-analytics:${appCenter}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
|
|
|
||||||
212
build.gradle.kts
212
build.gradle.kts
|
|
@ -17,41 +17,46 @@
|
||||||
* Copyright (C) 2021 - 2022 LSPosed Contributors
|
* Copyright (C) 2021 - 2022 LSPosed Contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.android.build.api.dsl.ApplicationExtension
|
import com.android.build.api.dsl.ApplicationDefaultConfig
|
||||||
import com.android.build.gradle.BaseExtension
|
import com.android.build.api.dsl.CommonExtension
|
||||||
import org.eclipse.jgit.api.Git
|
import com.android.build.gradle.api.AndroidBasePlugin
|
||||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
|
||||||
import org.gradle.internal.os.OperatingSystem
|
|
||||||
import java.nio.file.Paths
|
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") apply false
|
alias(libs.plugins.lsplugin.cmaker)
|
||||||
id("com.android.library") apply false
|
alias(libs.plugins.lsplugin.jgit)
|
||||||
|
alias(libs.plugins.agp.lib) apply false
|
||||||
|
alias(libs.plugins.agp.app) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
cmaker {
|
||||||
repositories {
|
default {
|
||||||
google()
|
arguments.addAll(
|
||||||
mavenCentral()
|
arrayOf(
|
||||||
|
"-DEXTERNAL_ROOT=${File(rootDir.absolutePath, "external")}",
|
||||||
|
"-DCORE_ROOT=${File(rootDir.absolutePath, "core/src/main/jni")}",
|
||||||
|
"-DANDROID_STL=none"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val flags = arrayOf(
|
||||||
|
"-DINJECTED_AID=$injectedPackageUid",
|
||||||
|
"-Wno-gnu-string-literal-operator-template",
|
||||||
|
"-Wno-c++2b-extensions",
|
||||||
|
)
|
||||||
|
cFlags.addAll(flags)
|
||||||
|
cppFlags.addAll(flags)
|
||||||
|
abiFilters("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
||||||
}
|
}
|
||||||
dependencies {
|
buildTypes {
|
||||||
classpath("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r")
|
if (it.name == "release") {
|
||||||
|
arguments += "-DDEBUG_SYMBOLS_PATH=${buildDir.absolutePath}/symbols"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val (commitCount, latestTag) = FileRepositoryBuilder().setGitDir(rootProject.file(".git"))
|
|
||||||
.runCatching {
|
val repo = jgit.repo()
|
||||||
build().use { repo ->
|
val commitCount = repo?.commitCount("refs/remotes/origin/master") ?: 1
|
||||||
val git = Git(repo)
|
val latestTag = repo?.latestTag ?: "1.0"
|
||||||
val commitCount =
|
|
||||||
git.log()
|
|
||||||
.add(repo.refDatabase.exactRef("refs/remotes/origin/master").objectId)
|
|
||||||
.call().count() + 4200
|
|
||||||
val ver = git.describe()
|
|
||||||
.setTags(true)
|
|
||||||
.setAbbrev(0).call().removePrefix("v")
|
|
||||||
commitCount to ver
|
|
||||||
}
|
|
||||||
}.getOrNull() ?: (1 to "1.0")
|
|
||||||
|
|
||||||
val injectedPackageName by extra("com.android.shell")
|
val injectedPackageName by extra("com.android.shell")
|
||||||
val injectedPackageUid by extra(2000)
|
val injectedPackageUid by extra(2000)
|
||||||
|
|
@ -71,140 +76,43 @@ tasks.register("Delete", Delete::class) {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun findInPath(executable: String): String? {
|
subprojects {
|
||||||
val pathEnv = System.getenv("PATH")
|
plugins.withType(AndroidBasePlugin::class.java) {
|
||||||
return pathEnv.split(File.pathSeparator).map { folder ->
|
extensions.configure(CommonExtension::class.java) {
|
||||||
Paths.get("${folder}${File.separator}${executable}${if (OperatingSystem.current().isWindows) ".exe" else ""}")
|
compileSdk = androidCompileSdkVersion
|
||||||
.toFile()
|
ndkVersion = androidCompileNdkVersion
|
||||||
}.firstOrNull { path ->
|
buildToolsVersion = androidBuildToolsVersion
|
||||||
path.exists()
|
|
||||||
}?.absolutePath
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.configureBaseExtension() {
|
|
||||||
extensions.findByType(BaseExtension::class)?.run {
|
|
||||||
compileSdkVersion(androidCompileSdkVersion)
|
|
||||||
ndkVersion = androidCompileNdkVersion
|
|
||||||
buildToolsVersion = androidBuildToolsVersion
|
|
||||||
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
version = "3.22.1+"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdk = androidMinSdkVersion
|
|
||||||
targetSdk = androidTargetSdkVersion
|
|
||||||
versionCode = verCode
|
|
||||||
versionName = verName
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments += "-DEXTERNAL_ROOT=${File(rootDir.absolutePath, "external")}"
|
version = "3.22.1+"
|
||||||
arguments += "-DCORE_ROOT=${File(rootDir.absolutePath, "core/src/main/jni")}"
|
|
||||||
abiFilters("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
|
||||||
val flags = arrayOf(
|
|
||||||
"-Wall",
|
|
||||||
"-Qunused-arguments",
|
|
||||||
"-Wno-gnu-string-literal-operator-template",
|
|
||||||
"-fno-rtti",
|
|
||||||
"-fvisibility=hidden",
|
|
||||||
"-fvisibility-inlines-hidden",
|
|
||||||
"-fno-exceptions",
|
|
||||||
"-fno-stack-protector",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-Wno-builtin-macro-redefined",
|
|
||||||
"-Wno-unused-value",
|
|
||||||
"-D__FILE__=__FILE_NAME__",
|
|
||||||
"-DINJECTED_AID=$injectedPackageUid",
|
|
||||||
)
|
|
||||||
cppFlags("-std=c++20", *flags)
|
|
||||||
cFlags("-std=c2x", *flags)
|
|
||||||
arguments(
|
|
||||||
"-DANDROID_STL=none",
|
|
||||||
)
|
|
||||||
findInPath("ccache")?.let {
|
|
||||||
println("Using ccache $it")
|
|
||||||
arguments += "-DANDROID_CCACHE=$it"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
defaultConfig {
|
||||||
targetCompatibility(androidTargetCompatibility)
|
minSdk = androidMinSdkVersion
|
||||||
sourceCompatibility(androidSourceCompatibility)
|
if (this is ApplicationDefaultConfig) {
|
||||||
}
|
targetSdk = androidTargetSdkVersion
|
||||||
|
versionCode = verCode
|
||||||
buildTypes {
|
versionName = verName
|
||||||
named("debug") {
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
arguments.addAll(
|
|
||||||
arrayOf(
|
|
||||||
"-DCMAKE_CXX_FLAGS_DEBUG=-Og",
|
|
||||||
"-DCMAKE_C_FLAGS_DEBUG=-Og",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
named("release") {
|
|
||||||
externalNativeBuild {
|
lint {
|
||||||
cmake {
|
abortOnError = true
|
||||||
val flags = arrayOf(
|
checkReleaseBuilds = false
|
||||||
"-Wl,--exclude-libs,ALL",
|
}
|
||||||
"-ffunction-sections",
|
|
||||||
"-fdata-sections",
|
compileOptions {
|
||||||
"-Wl,--gc-sections",
|
sourceCompatibility = androidSourceCompatibility
|
||||||
"-fno-unwind-tables",
|
targetCompatibility = androidTargetCompatibility
|
||||||
"-fno-asynchronous-unwind-tables",
|
|
||||||
"-flto=thin",
|
|
||||||
"-Wl,--thinlto-cache-policy,cache_size_bytes=300m",
|
|
||||||
"-Wl,--thinlto-cache-dir=${buildDir.absolutePath}/.lto-cache",
|
|
||||||
)
|
|
||||||
cppFlags.addAll(flags)
|
|
||||||
cFlags.addAll(flags)
|
|
||||||
val configFlags = arrayOf(
|
|
||||||
"-Oz",
|
|
||||||
"-DNDEBUG"
|
|
||||||
).joinToString(" ")
|
|
||||||
arguments.addAll(
|
|
||||||
arrayOf(
|
|
||||||
"-DCMAKE_BUILD_TYPE=Release",
|
|
||||||
"-DCMAKE_CXX_FLAGS_RELEASE=$configFlags",
|
|
||||||
"-DCMAKE_C_FLAGS_RELEASE=$configFlags",
|
|
||||||
"-DDEBUG_SYMBOLS_PATH=${buildDir.absolutePath}/symbols",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
plugins.withType(JavaPlugin::class.java) {
|
||||||
extensions.findByType(ApplicationExtension::class)?.lint {
|
extensions.configure(JavaPluginExtension::class.java) {
|
||||||
abortOnError = true
|
sourceCompatibility = androidSourceCompatibility
|
||||||
checkReleaseBuilds = false
|
targetCompatibility = androidTargetCompatibility
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.configureJavaExtension() {
|
|
||||||
extensions.findByType(JavaPluginExtension::class.java)?.run {
|
|
||||||
sourceCompatibility = androidSourceCompatibility
|
|
||||||
targetCompatibility = androidTargetCompatibility
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
subprojects {
|
|
||||||
plugins.withId("com.android.application") {
|
|
||||||
configureBaseExtension()
|
|
||||||
}
|
|
||||||
plugins.withId("com.android.library") {
|
|
||||||
configureBaseExtension()
|
|
||||||
}
|
|
||||||
plugins.withId("org.gradle.java-library") {
|
|
||||||
configureJavaExtension()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@
|
||||||
val verName: String by rootProject.extra
|
val verName: String by rootProject.extra
|
||||||
val verCode: Int by rootProject.extra
|
val verCode: Int by rootProject.extra
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
alias(libs.plugins.agp.lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
@ -55,12 +56,12 @@ copy {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("io.github.libxposed:api:100")
|
api(libs.libxposed.api)
|
||||||
implementation("org.apache.commons:commons-lang3:3.12.0")
|
implementation(libs.commons.lang3)
|
||||||
implementation("de.upb.cs.swt:axml:2.1.3")
|
implementation(libs.axml)
|
||||||
compileOnly("androidx.annotation:annotation:1.5.0")
|
|
||||||
compileOnly(projects.hiddenapi.stubs)
|
|
||||||
implementation(projects.hiddenapi.bridge)
|
implementation(projects.hiddenapi.bridge)
|
||||||
implementation(projects.services.daemonService)
|
implementation(projects.services.daemonService)
|
||||||
implementation(projects.services.managerService)
|
implementation(projects.services.managerService)
|
||||||
|
compileOnly(libs.androidx.annotation)
|
||||||
|
compileOnly(projects.hiddenapi.stubs)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,15 @@
|
||||||
* Copyright (C) 2021 LSPosed Contributors
|
* Copyright (C) 2021 LSPosed Contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
import com.android.ide.common.signing.KeystoreHelper
|
import com.android.ide.common.signing.KeystoreHelper
|
||||||
import java.io.PrintStream
|
import java.io.PrintStream
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
id("org.lsposed.lsplugin.resopt")
|
alias(libs.plugins.lsplugin.resopt)
|
||||||
}
|
}
|
||||||
|
|
||||||
val daemonName = "LSPosed"
|
val daemonName = "LSPosed"
|
||||||
|
|
@ -31,7 +33,7 @@ val daemonName = "LSPosed"
|
||||||
val injectedPackageName: String by rootProject.extra
|
val injectedPackageName: String by rootProject.extra
|
||||||
val injectedPackageUid: Int by rootProject.extra
|
val injectedPackageUid: Int by rootProject.extra
|
||||||
|
|
||||||
val agpVersion : String by project
|
val agpVersion: String by project
|
||||||
|
|
||||||
val defaultManagerPackageName: String by rootProject.extra
|
val defaultManagerPackageName: String by rootProject.extra
|
||||||
|
|
||||||
|
|
@ -90,7 +92,7 @@ android.applicationVariants.all {
|
||||||
val outSrcDir = file("$buildDir/generated/source/signInfo/${variantLowered}")
|
val outSrcDir = file("$buildDir/generated/source/signInfo/${variantLowered}")
|
||||||
val signInfoTask = tasks.register("generate${variantCapped}SignInfo") {
|
val signInfoTask = tasks.register("generate${variantCapped}SignInfo") {
|
||||||
dependsOn(":app:validateSigning${variantCapped}")
|
dependsOn(":app:validateSigning${variantCapped}")
|
||||||
val sign = signingConfig
|
val sign = rootProject.project(":app").extensions.getByType(ApplicationExtension::class.java).buildTypes.named(variantLowered).get().signingConfig
|
||||||
val outSrc = file("$outSrcDir/org/lsposed/lspd/util/SignInfo.java")
|
val outSrc = file("$outSrcDir/org/lsposed/lspd/util/SignInfo.java")
|
||||||
outputs.file(outSrc)
|
outputs.file(outSrc)
|
||||||
doLast {
|
doLast {
|
||||||
|
|
@ -117,12 +119,12 @@ android.applicationVariants.all {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("io.github.libxposed:service-interface:100")
|
implementation(libs.libxposed.service.`interface`)
|
||||||
implementation("com.android.tools.build:apksig:$agpVersion")
|
implementation(libs.agp.apksig)
|
||||||
implementation("org.apache.commons:commons-lang3:3.12.0")
|
implementation(libs.commons.lang3)
|
||||||
compileOnly("androidx.annotation:annotation:1.5.0")
|
|
||||||
compileOnly(projects.hiddenapi.stubs)
|
|
||||||
implementation(projects.hiddenapi.bridge)
|
implementation(projects.hiddenapi.bridge)
|
||||||
implementation(projects.services.daemonService)
|
implementation(projects.services.daemonService)
|
||||||
implementation(projects.services.managerService)
|
implementation(projects.services.managerService)
|
||||||
|
compileOnly(libs.androidx.annotation)
|
||||||
|
compileOnly(projects.hiddenapi.stubs)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
* Copyright (C) 2022 LSPosed Contributors
|
* Copyright (C) 2022 LSPosed Contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
alias(libs.plugins.agp.lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,3 @@ android.enableR8.fullMode=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|
||||||
org.gradle.unsafe.configuration-cache=true
|
org.gradle.unsafe.configuration-cache=true
|
||||||
|
|
||||||
agpVersion=7.4.1
|
|
||||||
navVersion=2.5.3
|
|
||||||
kotlinVersion=1.8.10
|
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,10 @@ import org.objectweb.asm.ClassVisitor
|
||||||
import org.objectweb.asm.MethodVisitor
|
import org.objectweb.asm.MethodVisitor
|
||||||
import org.objectweb.asm.Opcodes
|
import org.objectweb.asm.Opcodes
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
id("org.lsposed.lsplugin.resopt")
|
alias(libs.plugins.lsplugin.resopt)
|
||||||
}
|
}
|
||||||
|
|
||||||
val moduleName = "LSPosed"
|
val moduleName = "LSPosed"
|
||||||
|
|
@ -123,12 +124,12 @@ abstract class Injected @Inject constructor(val magiskDir: String) {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("androidx.annotation:annotation:1.5.0")
|
|
||||||
compileOnly(projects.hiddenapi.stubs)
|
|
||||||
implementation(projects.core)
|
implementation(projects.core)
|
||||||
implementation(projects.hiddenapi.bridge)
|
implementation(projects.hiddenapi.bridge)
|
||||||
implementation(projects.services.managerService)
|
implementation(projects.services.managerService)
|
||||||
implementation(projects.services.daemonService)
|
implementation(projects.services.daemonService)
|
||||||
|
compileOnly(libs.androidx.annotation)
|
||||||
|
compileOnly(projects.hiddenapi.stubs)
|
||||||
}
|
}
|
||||||
|
|
||||||
val zipAll = task("zipAll") {
|
val zipAll = task("zipAll") {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
* Copyright (C) 2021 LSPosed Contributors
|
* Copyright (C) 2021 LSPosed Contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
alias(libs.plugins.agp.lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
* Copyright (C) 2021 LSPosed Contributors
|
* Copyright (C) 2021 LSPosed Contributors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
alias(libs.plugins.agp.lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
@ -35,5 +36,5 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("dev.rikka.rikkax.parcelablelist:parcelablelist:2.0.1")
|
api(libs.rikkax.parcelablelist)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,6 @@ pluginManagement {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
plugins {
|
|
||||||
id("com.android.library") version agpVersion
|
|
||||||
id("com.android.application") version agpVersion
|
|
||||||
id("org.jetbrains.kotlin.android") version kotlinVersion
|
|
||||||
id("androidx.navigation.safeargs") version navVersion
|
|
||||||
id("dev.rikka.tools.autoresconfig") version "1.2.2"
|
|
||||||
id("dev.rikka.tools.materialthemebuilder") version "1.3.3"
|
|
||||||
id("org.lsposed.lsplugin.resopt") version "1.2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
|
|
@ -27,6 +18,77 @@ dependencyResolutionManagement {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
|
versionCatalogs {
|
||||||
|
create("libs") {
|
||||||
|
val agpVersion = version("agp", "7.4.1")
|
||||||
|
val kotlinVersion = version("kotlin", "1.8.10")
|
||||||
|
val navVersion = version("nav", "2.5.3")
|
||||||
|
val appCenterVersion = version("appcenter", "5.0.0")
|
||||||
|
val libxposedVersion = version("libxposed", "100")
|
||||||
|
val glideVersion = version("glide", "4.15.0")
|
||||||
|
val okhttpVersion = version("okhttp", "4.10.0")
|
||||||
|
|
||||||
|
plugin("agp-lib", "com.android.library").versionRef(agpVersion)
|
||||||
|
plugin("agp-app", "com.android.application").versionRef(agpVersion)
|
||||||
|
plugin("kotlin", "org.jetbrains.kotlin.android").versionRef(kotlinVersion)
|
||||||
|
plugin("nav-safeargs", "androidx.navigation.safeargs").versionRef(navVersion)
|
||||||
|
plugin("autoresconfig", "dev.rikka.tools.autoresconfig").version("1.2.2")
|
||||||
|
plugin("materialthemebuilder", "dev.rikka.tools.materialthemebuilder").version("1.3.3")
|
||||||
|
plugin("lsplugin-resopt", "org.lsposed.lsplugin.resopt").version("1.3")
|
||||||
|
plugin("lsplugin-apksign", "org.lsposed.lsplugin.apksign").version("1.1")
|
||||||
|
plugin("lsplugin-cmaker", "org.lsposed.lsplugin.cmaker").version("1.0")
|
||||||
|
plugin("lsplugin-jgit", "org.lsposed.lsplugin.jgit").version("1.0")
|
||||||
|
|
||||||
|
library("appcenter-crashes", "com.microsoft.appcenter", "appcenter-crashes").versionRef(appCenterVersion)
|
||||||
|
library("appcenter-analytics", "com.microsoft.appcenter", "appcenter-analytics").versionRef(appCenterVersion)
|
||||||
|
|
||||||
|
library("libxposed-api", "io.github.libxposed", "api").versionRef(libxposedVersion)
|
||||||
|
library("libxposed-service-interface", "io.github.libxposed", "service-interface").versionRef(libxposedVersion)
|
||||||
|
|
||||||
|
|
||||||
|
library("rikkax-appcompat", "dev.rikka.rikkax.appcompat:appcompat:1.5.0.1")
|
||||||
|
library("rikkax-core", "dev.rikka.rikkax.core:core:1.4.1")
|
||||||
|
library("rikkax-insets", "dev.rikka.rikkax.insets:insets:1.3.0")
|
||||||
|
library("rikkax-layoutinflater", "dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0")
|
||||||
|
library("rikkax-material", "dev.rikka.rikkax.material:material:2.5.1")
|
||||||
|
library("rikkax-material-preference", "dev.rikka.rikkax.material:material-preference:2.0.0")
|
||||||
|
library("rikkax-parcelablelist", "dev.rikka.rikkax.parcelablelist:parcelablelist:2.0.1")
|
||||||
|
library("rikkax-preference", "dev.rikka.rikkax.preference:simplemenu-preference:1.0.3")
|
||||||
|
library("rikkax-recyclerview", "dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.3.1")
|
||||||
|
library("rikkax-widget-borderview", "dev.rikka.rikkax.widget:borderview:1.1.0")
|
||||||
|
library("rikkax-widget-mainswitchbar", "dev.rikka.rikkax.widget:mainswitchbar:1.0.2")
|
||||||
|
|
||||||
|
library("androidx-activity", "androidx.activity:activity:1.6.1")
|
||||||
|
library("androidx-annotation", "androidx.annotation:annotation:1.5.0")
|
||||||
|
library("androidx-browser", "androidx.browser:browser:1.5.0")
|
||||||
|
library("androidx-constraintlayout", "androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
|
library("androidx-core", "androidx.core:core:1.9.0")
|
||||||
|
library("androidx-fragment", "androidx.fragment:fragment:1.5.5")
|
||||||
|
library("androidx-navigation-fragment", "androidx.navigation", "navigation-fragment").versionRef(navVersion)
|
||||||
|
library("androidx-navigation-ui", "androidx.navigation", "navigation-ui").versionRef(navVersion)
|
||||||
|
library("androidx-preference", "androidx.preference:preference:1.2.0")
|
||||||
|
library("androidx-recyclerview", "androidx.recyclerview:recyclerview:1.2.1")
|
||||||
|
library("androidx-swiperefreshlayout", "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
|
||||||
|
|
||||||
|
library("glide", "com.github.bumptech.glide", "glide").versionRef(glideVersion)
|
||||||
|
library("glide-compiler", "com.github.bumptech.glide", "compiler").versionRef(glideVersion)
|
||||||
|
|
||||||
|
library("okhttp", "com.squareup.okhttp3", "okhttp").versionRef(okhttpVersion)
|
||||||
|
library("okhttp-dnsoverhttps", "com.squareup.okhttp3", "okhttp-dnsoverhttps").versionRef(okhttpVersion)
|
||||||
|
library("okhttp-logging-interceptor", "com.squareup.okhttp3", "logging-interceptor").versionRef(okhttpVersion)
|
||||||
|
|
||||||
|
|
||||||
|
library("agp-apksig", "com.android.tools.build", "apksig").versionRef(agpVersion)
|
||||||
|
library("appiconloader", "me.zhanghai.android.appiconloader:appiconloader:1.5.0")
|
||||||
|
library("axml", "de.upb.cs.swt:axml:2.1.3")
|
||||||
|
library("commons-lang3", "org.apache.commons:commons-lang3:3.12.0")
|
||||||
|
library("material", "com.google.android.material:material:1.8.0")
|
||||||
|
library("gson", "com.google.code.gson:gson:2.10.1")
|
||||||
|
library("hiddenapibypass", "org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
|
||||||
|
library("kotlin-stdlib", "org.jetbrains.kotlin", "kotlin-stdlib").versionRef(kotlinVersion)
|
||||||
|
library("kotlinx-coroutines-core", "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "LSPosed"
|
rootProject.name = "LSPosed"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue