2022-03-16 22:00:41 +01:00
|
|
|
plugins {
|
2022-05-24 00:16:57 +02:00
|
|
|
kotlin("jvm") version "1.6.21"
|
2022-03-21 16:22:15 +01:00
|
|
|
java
|
2022-03-20 20:30:51 +01:00
|
|
|
`maven-publish`
|
2022-03-16 22:00:41 +01:00
|
|
|
}
|
|
|
|
|
2022-03-21 21:54:16 +01:00
|
|
|
group = "app.revanced"
|
2022-03-16 22:00:41 +01:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-04-09 18:20:12 +02:00
|
|
|
maven {
|
2022-05-07 01:17:10 +02:00
|
|
|
url = uri("https://maven.pkg.github.com/revanced/multidexlib2")
|
2022-04-09 18:20:12 +02:00
|
|
|
credentials {
|
2022-04-09 20:33:22 +02:00
|
|
|
// DO NOT set these variables in the project's gradle.properties.
|
|
|
|
// Instead, you should set them in:
|
|
|
|
// Windows: %homepath%\.gradle\gradle.properties
|
|
|
|
// Linux: ~/.gradle/gradle.properties
|
2022-04-09 18:20:12 +02:00
|
|
|
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
|
|
|
|
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
|
|
|
|
}
|
|
|
|
}
|
2022-03-16 22:00:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-05-22 17:10:43 +02:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.21")
|
2022-04-03 23:51:01 +02:00
|
|
|
|
2022-05-04 23:46:04 +02:00
|
|
|
api("org.apktool:apktool-lib:2.6.1")
|
2022-04-10 00:52:32 +02:00
|
|
|
api("app.revanced:multidexlib2:2.5.2.r2")
|
|
|
|
api("org.smali:smali:2.5.2")
|
2022-04-03 23:51:01 +02:00
|
|
|
|
2022-05-22 17:10:43 +02:00
|
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test:1.6.21")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.21")
|
2022-03-18 20:46:24 +01:00
|
|
|
}
|
|
|
|
|
2022-04-08 22:49:37 +02:00
|
|
|
tasks {
|
2022-04-10 00:52:32 +02:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
|
|
events("PASSED", "SKIPPED", "FAILED")
|
|
|
|
}
|
2022-04-08 22:49:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-21 16:22:15 +01:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
|
|
|
|
2022-04-10 00:52:32 +02:00
|
|
|
val isGitHubCI = System.getenv("GITHUB_ACTOR") != null
|
|
|
|
|
2022-03-20 20:30:51 +01:00
|
|
|
publishing {
|
|
|
|
repositories {
|
2022-04-10 00:52:32 +02:00
|
|
|
if (isGitHubCI) {
|
|
|
|
maven {
|
|
|
|
name = "GitHubPackages"
|
2022-05-07 01:17:10 +02:00
|
|
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
2022-04-10 00:52:32 +02:00
|
|
|
credentials {
|
|
|
|
username = System.getenv("GITHUB_ACTOR")
|
|
|
|
password = System.getenv("GITHUB_TOKEN")
|
|
|
|
}
|
2022-03-20 20:30:51 +01:00
|
|
|
}
|
2022-04-10 00:52:32 +02:00
|
|
|
} else {
|
|
|
|
mavenLocal()
|
2022-03-20 20:30:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
register<MavenPublication>("gpr") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|
2022-05-04 23:46:04 +02:00
|
|
|
}
|