diff --git a/build.gradle.kts b/build.gradle.kts index 038574c..ca7aa3b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,24 +1,21 @@ plugins { - kotlin("jvm") version "1.6.21" + kotlin("jvm") version "1.7.0" java `maven-publish` } group = "app.revanced" +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") + repositories { mavenCentral() maven { url = uri("https://maven.pkg.github.com/revanced/multidexlib2") credentials { - // 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! + username = githubUsername + password = githubPassword } } } @@ -32,8 +29,7 @@ dependencies { api("org.smali:smali:2.5.2") testImplementation(kotlin("test")) - implementation(kotlin("reflect")) -} + implementation(kotlin("reflect"))} tasks { test { @@ -49,11 +45,8 @@ java { withJavadocJar() } -val isGitHubCI = System.getenv("GITHUB_ACTOR") != null - publishing { repositories { - if (isGitHubCI) { maven { name = "GitHubPackages" url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") @@ -62,9 +55,6 @@ publishing { password = System.getenv("GITHUB_TOKEN") } } - } else { - mavenLocal() - } } publications { register("gpr") {