2022-03-16 22:00:41 +01:00
|
|
|
plugins {
|
2022-06-14 00:54:22 +02:00
|
|
|
kotlin("jvm") version "1.7.0"
|
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
|
|
|
|
2022-06-14 00:54:22 +02:00
|
|
|
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")
|
|
|
|
|
2022-03-16 22:00:41 +01:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-05-26 03:51:25 +02:00
|
|
|
maven {
|
|
|
|
url = uri("https://maven.pkg.github.com/revanced/multidexlib2")
|
|
|
|
credentials {
|
2022-06-14 00:54:22 +02:00
|
|
|
username = githubUsername
|
|
|
|
password = githubPassword
|
2022-04-09 18:20:12 +02:00
|
|
|
}
|
|
|
|
}
|
2022-03-16 22:00:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-06-22 02:54:23 +02:00
|
|
|
implementation("xpp3:xpp3:1.1.4c")
|
|
|
|
implementation("org.smali:smali:2.5.2")
|
2022-06-28 00:01:38 +02:00
|
|
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
2022-07-24 18:29:25 +02:00
|
|
|
implementation("org.apktool:apktool-lib:2.7.0-SNAPSHOT")
|
2022-04-03 23:51:01 +02:00
|
|
|
|
2022-09-07 20:52:05 +02:00
|
|
|
implementation(kotlin("reflect"))
|
2022-05-24 17:43:43 +02:00
|
|
|
testImplementation(kotlin("test"))
|
2022-06-20 17:07:04 +02:00
|
|
|
}
|
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-09-08 14:41:42 +02:00
|
|
|
processResources {
|
|
|
|
expand("projectVersion" to project.version)
|
|
|
|
}
|
2022-04-08 22:49:37 +02:00
|
|
|
}
|
|
|
|
|
2022-03-21 16:22:15 +01:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
2022-03-20 20:30:51 +01:00
|
|
|
publishing {
|
|
|
|
repositories {
|
2022-06-26 14:43:53 +02:00
|
|
|
if (System.getenv("GITHUB_ACTOR") != null)
|
2022-04-10 00:52:32 +02:00
|
|
|
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-06-26 14:43:53 +02:00
|
|
|
else
|
|
|
|
mavenLocal()
|
2022-03-20 20:30:51 +01:00
|
|
|
}
|
|
|
|
publications {
|
|
|
|
register<MavenPublication>("gpr") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|
2022-06-18 22:52:49 +02:00
|
|
|
}
|