2024-03-04 19:15:07 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
2022-03-16 22:00:41 +01:00
|
|
|
plugins {
|
2024-02-11 21:09:38 +01:00
|
|
|
alias(libs.plugins.kotlin)
|
2023-08-29 03:47:01 +02:00
|
|
|
alias(libs.plugins.binary.compatibility.validator)
|
2023-08-27 04:47:07 +02:00
|
|
|
`maven-publish`
|
|
|
|
signing
|
2022-03-16 22:00:41 +01:00
|
|
|
}
|
2023-09-06 05:23:26 +02:00
|
|
|
|
2023-10-14 19:18:57 +02:00
|
|
|
group = "app.revanced"
|
2023-08-27 04:47:07 +02:00
|
|
|
|
2023-10-14 19:18:57 +02:00
|
|
|
tasks {
|
|
|
|
processResources {
|
|
|
|
expand("projectVersion" to project.version)
|
2023-08-27 04:47:07 +02:00
|
|
|
}
|
|
|
|
|
2023-10-14 19:18:57 +02:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
|
|
events("PASSED", "SKIPPED", "FAILED")
|
|
|
|
}
|
2023-08-27 04:47:07 +02:00
|
|
|
}
|
2023-10-14 19:18:57 +02:00
|
|
|
}
|
2023-08-27 04:47:07 +02:00
|
|
|
|
2023-10-14 19:18:57 +02:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
google()
|
2024-02-14 01:12:54 +01:00
|
|
|
maven {
|
2024-04-05 21:17:41 +02:00
|
|
|
// A repository must be specified for some reason. "registry" is a dummy.
|
2024-02-14 01:12:54 +01:00
|
|
|
url = uri("https://maven.pkg.github.com/revanced/registry")
|
|
|
|
credentials {
|
|
|
|
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
|
|
|
|
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
|
|
|
|
}
|
|
|
|
}
|
2023-10-14 19:18:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-02-11 21:09:38 +01:00
|
|
|
// TODO: Convert project to KMP.
|
|
|
|
compileOnly(libs.android) {
|
|
|
|
// Exclude, otherwise the org.w3c.dom API breaks.
|
|
|
|
exclude(group = "xerces", module = "xmlParserAPIs")
|
|
|
|
}
|
2024-08-01 17:53:58 +02:00
|
|
|
|
|
|
|
implementation(libs.apktool.lib)
|
|
|
|
implementation(libs.kotlin.reflect)
|
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
|
|
implementation(libs.multidexlib2)
|
|
|
|
implementation(libs.smali)
|
|
|
|
implementation(libs.xpp3)
|
|
|
|
|
2024-07-21 22:45:45 +02:00
|
|
|
testImplementation(libs.mockk)
|
2024-08-01 17:53:58 +02:00
|
|
|
testImplementation(libs.kotlin.test)
|
2023-10-14 19:18:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
2024-03-04 19:15:07 +01:00
|
|
|
compilerOptions {
|
|
|
|
jvmTarget.set(JvmTarget.JVM_11)
|
2024-11-04 02:24:16 +01:00
|
|
|
|
|
|
|
freeCompilerArgs = listOf("-Xcontext-receivers")
|
2024-03-04 19:15:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
2024-03-14 12:21:48 +01:00
|
|
|
|
|
|
|
withSourcesJar()
|
2023-10-14 19:18:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
2024-02-14 01:12:54 +01:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "GitHubPackages"
|
|
|
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
|
|
|
credentials {
|
|
|
|
username = System.getenv("GITHUB_ACTOR")
|
|
|
|
password = System.getenv("GITHUB_TOKEN")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-14 19:18:57 +02:00
|
|
|
publications {
|
|
|
|
create<MavenPublication>("revanced-patcher-publication") {
|
|
|
|
from(components["java"])
|
|
|
|
|
|
|
|
version = project.version.toString()
|
|
|
|
|
|
|
|
pom {
|
|
|
|
name = "ReVanced Patcher"
|
|
|
|
description = "Patcher used by ReVanced."
|
|
|
|
url = "https://revanced.app"
|
|
|
|
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name = "GNU General Public License v3.0"
|
|
|
|
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = "ReVanced"
|
|
|
|
name = "ReVanced"
|
|
|
|
email = "contact@revanced.app"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection = "scm:git:git://github.com/revanced/revanced-patcher.git"
|
|
|
|
developerConnection = "scm:git:git@github.com:revanced/revanced-patcher.git"
|
|
|
|
url = "https://github.com/revanced/revanced-patcher"
|
|
|
|
}
|
2023-08-27 04:47:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-26 05:57:41 +01:00
|
|
|
}
|
2024-02-13 05:17:02 +01:00
|
|
|
|
|
|
|
signing {
|
|
|
|
useGpgCmd()
|
|
|
|
sign(publishing.publications["revanced-patcher-publication"])
|
|
|
|
}
|