mirror of
https://github.com/topjohnwu/libsu.git
synced 2024-11-26 21:40:42 +00:00
Update AGP
This commit is contained in:
parent
c99fbab72e
commit
6a68ae3869
@ -6,7 +6,7 @@ import java.net.URL
|
||||
plugins {
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
id("com.android.library") version "8.1.1" apply false
|
||||
id("com.android.library") version "8.4.2" apply false
|
||||
}
|
||||
|
||||
val dlPackageList by tasks.registering {
|
||||
@ -24,8 +24,8 @@ val dlPackageList by tasks.registering {
|
||||
// Strip out empty lines
|
||||
val packageList = bos.toString("UTF-8").replace("\n+".toRegex(), "\n")
|
||||
|
||||
rootProject.buildDir.mkdirs()
|
||||
File(rootProject.buildDir, "package-list").outputStream().use {
|
||||
rootProject.layout.buildDirectory.asFile.get().mkdirs()
|
||||
rootProject.layout.buildDirectory.file("package-list").get().asFile.outputStream().use {
|
||||
it.writer().write(packageList)
|
||||
it.write("\n".toByteArray())
|
||||
}
|
||||
@ -39,11 +39,12 @@ val javadoc = (tasks["javadoc"] as Javadoc).apply {
|
||||
exclude("**/internal/**")
|
||||
(options as StandardJavadocDocletOptions).apply {
|
||||
linksOffline = listOf(JavadocOfflineLink(
|
||||
"https://developer.android.com/reference/", rootProject.buildDir.path))
|
||||
"https://developer.android.com/reference/",
|
||||
rootProject.layout.buildDirectory.asFile.get().path))
|
||||
isNoDeprecated = true
|
||||
addBooleanOption("-ignore-source-errors").value = true
|
||||
}
|
||||
setDestinationDir(File(rootProject.buildDir, "javadoc"))
|
||||
setDestinationDir(rootProject.layout.buildDirectory.dir("javadoc").get().asFile)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.registering(Jar::class) {
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -18,10 +18,12 @@ android {
|
||||
}
|
||||
|
||||
android.libraryVariants.all {
|
||||
val jarTask = tasks.register("create${name.capitalize()}MainJar") {
|
||||
val variantName = name
|
||||
val variantCapped = variantName.replaceFirstChar { it.uppercaseChar() }
|
||||
val jarTask = tasks.register("create${variantCapped}MainJar") {
|
||||
doLast {
|
||||
val classDir = Paths.get(buildDir.path, "intermediates",
|
||||
"javac", this@all.name, "classes",
|
||||
val classDir = Paths.get(layout.buildDirectory.get().asFile.path, "intermediates",
|
||||
"javac", variantName, "compile${variantCapped}JavaWithJavac", "classes",
|
||||
"com", "topjohnwu", "superuser", "internal")
|
||||
|
||||
val classFiles = Files.list(classDir).use { stream ->
|
||||
@ -40,7 +42,7 @@ android.libraryVariants.all {
|
||||
if (Files.notExists(output.parent))
|
||||
Files.createDirectories(output.parent)
|
||||
|
||||
val pgConf = File(buildDir, "mainJar.pro")
|
||||
val pgConf = layout.buildDirectory.file("mainJar.pro").get().asFile
|
||||
|
||||
PrintStream(pgConf.outputStream()).use {
|
||||
it.println("-keep class com.topjohnwu.superuser.internal.RootServerMain")
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user