2022-03-21 15:19:51 +00:00
|
|
|
plugins {
|
2022-05-23 22:17:01 +00:00
|
|
|
kotlin("jvm") version "1.6.21"
|
2022-03-21 20:05:31 +00:00
|
|
|
java
|
2022-03-21 15:19:51 +00:00
|
|
|
`maven-publish`
|
|
|
|
}
|
|
|
|
|
2022-03-21 21:06:24 +00:00
|
|
|
group = "app.revanced"
|
2022-03-21 15:19:51 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-04-09 22:51:24 +00:00
|
|
|
mavenLocal()
|
2022-03-21 15:19:51 +00:00
|
|
|
maven {
|
2022-05-06 23:23:58 +00:00
|
|
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") // note the "r"!
|
2022-03-21 15:19:51 +00:00
|
|
|
credentials {
|
2022-03-21 20:05:31 +00: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
|
|
|
|
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-21 15:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-05-23 19:00:27 +00:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.21")
|
2022-03-21 15:19:51 +00:00
|
|
|
|
2022-06-11 23:38:54 +00:00
|
|
|
implementation("app.revanced:revanced-patcher:1.1.0")
|
2022-05-23 19:00:27 +00:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.21")
|
2022-03-21 20:05:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
|
|
|
|
2022-04-09 22:51:24 +00:00
|
|
|
val isGitHubCI = System.getenv("GITHUB_ACTOR") != null
|
|
|
|
|
2022-03-21 20:05:31 +00:00
|
|
|
publishing {
|
|
|
|
repositories {
|
2022-04-09 22:51:24 +00:00
|
|
|
if (isGitHubCI) {
|
|
|
|
maven {
|
|
|
|
name = "GitHubPackages"
|
2022-05-06 23:23:58 +00:00
|
|
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patches") // note the "s"!
|
2022-04-09 22:51:24 +00:00
|
|
|
credentials {
|
|
|
|
username = System.getenv("GITHUB_ACTOR")
|
|
|
|
password = System.getenv("GITHUB_TOKEN")
|
|
|
|
}
|
2022-03-21 20:05:31 +00:00
|
|
|
}
|
2022-04-09 22:51:24 +00:00
|
|
|
} else {
|
|
|
|
mavenLocal()
|
2022-03-21 20:05:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
register<MavenPublication>("gpr") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|
2022-05-06 23:23:58 +00:00
|
|
|
}
|