Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions brut.apktool/apktool-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks.register<Delete>("cleanOutputDirectory") {
})
}

val shadowJar = tasks.create("shadowJar", Jar::class) {
val shadowJar = tasks.register("shadowJar", Jar::class) {
dependsOn("build")
dependsOn("cleanOutputDirectory")

Expand All @@ -68,23 +68,23 @@ tasks.register<JavaExec>("proguard") {
}

val proguardRules = file("proguard-rules.pro")
val originalJar = shadowJar.outputs.files.singleFile
val originalJar = shadowJar.map { it.outputs.files.singleFile }

inputs.files(originalJar.toString(), proguardRules)
inputs.files(originalJar, proguardRules)
outputs.file("build/libs/apktool-$apktoolVersion.jar")

classpath(r8)
mainClass.set("com.android.tools.r8.R8")

args = mutableListOf(
args(
"--release",
"--classfile",
"--no-minification",
"--map-diagnostics:UnusedProguardKeepRuleDiagnostic", "info", "none",
"--lib", javaLauncher.get().metadata.installationPath.toString(),
"--output", outputs.files.singleFile.toString(),
"--pg-conf", proguardRules.toString(),
originalJar.toString()
originalJar.get().toString()
)
}

Expand Down
14 changes: 5 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,22 @@ defaultTasks("build", "shadowJar", "proguard")

// Functions
val gitDescribe: String? by lazy {
val stdout = ByteArrayOutputStream()
try {
rootProject.exec {
val result = providers.exec {
commandLine("git", "describe", "--tags")
standardOutput = stdout
}
stdout.toString().trim().replace("-g", "-")
result.standardOutput.asText.get().trim().replace("-g", "-")
} catch (e: Exception) {
null
}
}

val gitBranch: String? by lazy {
val stdout = ByteArrayOutputStream()
try {
rootProject.exec {
val result = providers.exec {
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
standardOutput = stdout
}
stdout.toString().trim()
result.standardOutput.asText.get().trim()
} catch (e: Exception) {
null
}
Expand Down Expand Up @@ -95,7 +91,7 @@ subprojects {
}
}

task("release") {
tasks.register("release") {
// Used for official releases.
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading