mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
6b8977f178
This commit introduces a couple changes besides the refactor. Executing patches can be cancelled, multiple bundles loaded into the same class loader and `Patch.execute` does not have to return anymore. BREAKING CHANGE: Various public APIs have been changed. The `Version` annotation has been removed. Patches do not return anything anymore and instead throw `PatchException`. Multiple patch bundles can now be loaded in a single ClassLoader to bypass class loader isolation.
78 lines
2 KiB
Text
78 lines
2 KiB
Text
plugins {
|
|
kotlin("jvm") version "1.8.20"
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "app.revanced"
|
|
|
|
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
|
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
mavenLocal()
|
|
listOf("multidexlib2", "apktool").forEach { repo ->
|
|
maven {
|
|
url = uri("https://maven.pkg.github.com/revanced/$repo")
|
|
credentials {
|
|
username = githubUsername
|
|
password = githubPassword
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
|
|
implementation("xpp3:xpp3:1.1.4c")
|
|
implementation("com.android.tools.smali:smali:3.0.3")
|
|
implementation("app.revanced:multidexlib2:3.0.3.r2")
|
|
implementation("app.revanced:apktool-lib:2.8.2-3")
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.22")
|
|
|
|
compileOnly("com.google.android:android:4.1.1.4")
|
|
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test:1.8.20-RC")
|
|
}
|
|
|
|
tasks {
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events("PASSED", "SKIPPED", "FAILED")
|
|
}
|
|
}
|
|
processResources {
|
|
expand("projectVersion" to project.version)
|
|
}
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(11)
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
if (System.getenv("GITHUB_ACTOR") != null)
|
|
maven {
|
|
name = "GitHubPackages"
|
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
|
credentials {
|
|
username = System.getenv("GITHUB_ACTOR")
|
|
password = System.getenv("GITHUB_TOKEN")
|
|
}
|
|
}
|
|
else
|
|
mavenLocal()
|
|
}
|
|
publications {
|
|
register<MavenPublication>("gpr") {
|
|
from(components["java"])
|
|
}
|
|
}
|
|
}
|