123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
- plugins {
- alias(libs.plugins.kotlin)
- alias(libs.plugins.binary.compatibility.validator)
- `maven-publish`
- signing
- }
- group = "app.revanced"
- tasks {
- processResources {
- expand("projectVersion" to project.version)
- }
- test {
- useJUnitPlatform()
- testLogging {
- events("PASSED", "SKIPPED", "FAILED")
- }
- }
- }
- repositories {
- mavenCentral()
- mavenLocal()
- google()
- maven {
- // A repository must be specified for some reason. "registry" is a dummy.
- 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")
- }
- }
- }
- dependencies {
- implementation(libs.kotlinx.coroutines.core)
- implementation(libs.xpp3)
- implementation(libs.smali)
- implementation(libs.multidexlib2)
- implementation(libs.apktool.lib)
- implementation(libs.kotlin.reflect)
- // TODO: Convert project to KMP.
- compileOnly(libs.android) {
- // Exclude, otherwise the org.w3c.dom API breaks.
- exclude(group = "xerces", module = "xmlParserAPIs")
- }
- testImplementation(libs.kotlin.test)
- }
- kotlin {
- compilerOptions {
- jvmTarget.set(JvmTarget.JVM_11)
- }
- }
- java {
- targetCompatibility = JavaVersion.VERSION_11
- withSourcesJar()
- }
- publishing {
- 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")
- }
- }
- }
- 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"
- }
- }
- }
- }
- }
- signing {
- useGpgCmd()
- sign(publishing.publications["revanced-patcher-publication"])
- }
|