mirror of
https://github.com/revanced/Apktool.git
synced 2025-04-30 06:04:25 +02:00
build: Publish on Jitpack
This commit is contained in:
parent
35e23a9ad7
commit
c68c74f7d4
@ -1,5 +0,0 @@
|
||||
jdk:
|
||||
- openjdk9
|
||||
install:
|
||||
- echo "This is not supported. See iBotPeaches/Apktool#2102"
|
||||
- ./gradlew invalid-command-to-crash-out
|
@ -1,20 +1,6 @@
|
||||
val gitRevision: String by rootProject.extra
|
||||
val apktoolVersion: String by rootProject.extra
|
||||
|
||||
// region Determine Android SDK location
|
||||
|
||||
val sdkRoot: String? = System.getenv("ANDROID_SDK_ROOT")
|
||||
val androidJarPath: String = if (sdkRoot == null) {
|
||||
GradleException("Missing ANDROID_SDK_ROOT").printStackTrace()
|
||||
|
||||
"com.google.android:android:4.1.1.4"
|
||||
} else {
|
||||
val androidVersion = 33
|
||||
File("$sdkRoot/platforms/android-$androidVersion/android.jar").path
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
from("src/main/resources/properties") {
|
||||
@ -54,5 +40,5 @@ dependencies {
|
||||
testImplementation(libs.junit)
|
||||
testImplementation(libs.xmlunit)
|
||||
|
||||
compileOnly(files(androidJarPath))
|
||||
compileOnly(libs.android)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
val version = "2.9.1"
|
||||
val suffix = "SNAPSHOT"
|
||||
val suffix = ""
|
||||
|
||||
// Strings embedded into the build.
|
||||
var gitRevision by extra("")
|
||||
@ -36,7 +36,7 @@ val gitBranch: String? by lazy {
|
||||
}
|
||||
}
|
||||
|
||||
if ("release" !in gradle.startParameter.taskNames) {
|
||||
if ("publishToMavenLocal" !in gradle.startParameter.taskNames) {
|
||||
val hash = this.gitDescribe
|
||||
|
||||
if (hash == null) {
|
||||
@ -84,7 +84,7 @@ subprojects {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
val mavenProjects = arrayOf("apktool-lib", "apktool-cli", "brut.j.common", "brut.j.util", "brut.j.dir")
|
||||
val mavenProjects = arrayOf("apktool-lib", "brut.j.common", "brut.j.util", "brut.j.dir")
|
||||
|
||||
if (project.name in mavenProjects) {
|
||||
apply(plugin = "maven-publish")
|
||||
@ -96,15 +96,6 @@ subprojects {
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/revanced/Apktool")
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR") ?: project.findProperty("gpr.user").toString()
|
||||
password = System.getenv("GITHUB_TOKEN") ?: project.findProperty("gpr.key").toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
register("mavenJava", MavenPublication::class) {
|
||||
from(components["java"])
|
||||
@ -148,11 +139,6 @@ subprojects {
|
||||
tasks.withType<Javadoc>() {
|
||||
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign(publishing.publications["mavenJava"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ shadow = "8.1.1"
|
||||
smali = "3.0.3"
|
||||
xmlpull = "1.1.4c"
|
||||
xmlunit = "2.9.1"
|
||||
android = "4.1.1.4"
|
||||
|
||||
[libraries]
|
||||
baksmali = { module = "com.android.tools.smali:smali-baksmali", version.ref = "baksmali" }
|
||||
@ -24,6 +25,7 @@ proguard = { module = "com.guardsquare:proguard-gradle", version.ref = "proguard
|
||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||
xmlpull = { module = "xpp3:xpp3", version.ref = "xmlpull" }
|
||||
xmlunit = { module = "org.xmlunit:xmlunit-legacy", version.ref = "xmlunit" }
|
||||
android = { module = "com.google.android:android", version.ref = "android" }
|
||||
|
||||
[plugins]
|
||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user