forked from JingMatrix/NeoZygisk
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
64 lines (54 loc) · 1.98 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
64 lines (54 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import com.android.build.api.dsl.LibraryExtension
plugins {
alias(libs.plugins.agp.lib) apply false
}
fun String.execute(currentWorkingDir: File = file("./")): String =
providers.exec {
workingDir = currentWorkingDir
commandLine = split("\\s".toRegex())
}.standardOutput.asText.get().trim()
val gitCommitCount = "git rev-list HEAD --count".execute().toInt()
val gitCommitHash = "git rev-parse --verify --short HEAD".execute()
val moduleId by extra("zygisksu")
val moduleName by extra("NyaZygisk")
val verName by extra("v2.4")
val verCode by extra(gitCommitCount)
val commitHash by extra(gitCommitHash)
val minAPatchVersion by extra(10762)
val minKsuVersion by extra(10940)
val minKsudVersion by extra(11425)
val maxKsuVersion by extra(50000)
val minMagiskVersion by extra(26402)
val workDirectory by extra("/data/adb/neozygisk")
val updateJson by extra("https://www.nkbe.top/nyazygisk/zygisk.json")
val androidMinSdkVersion by extra(25)
val androidTargetSdkVersion by extra(36)
val androidCompileSdkVersion by extra(36)
val androidBuildToolsVersion by extra("36.1.0")
// Don't update NDK unless after careful and detailed tests,
// as explained in https://github.com/JingMatrix/NeoZygisk/pull/36
val androidCompileNdkVersion by extra("27.2.12479018")
val androidSourceCompatibility by extra(JavaVersion.VERSION_21)
val androidTargetCompatibility by extra(JavaVersion.VERSION_21)
tasks.register("Delete", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
fun Project.configureBaseExtension() {
extensions.findByType(LibraryExtension::class)?.run {
namespace = "org.matrix.zygisk"
compileSdk = androidCompileSdkVersion
ndkVersion = androidCompileNdkVersion
buildToolsVersion = androidBuildToolsVersion
defaultConfig {
minSdk = androidMinSdkVersion
}
lint {
abortOnError = true
}
}
}
subprojects {
plugins.withId("com.android.library") {
configureBaseExtension()
}
}