mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: providers.gradleProperty (#1223)
This commit is contained in:
parent
42e0346e25
commit
0b0ba21852
@ -1,4 +1,15 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
// TODO: remove this once https://github.com/gradle/gradle/issues/23572 is fixed
|
||||||
|
val (gprUser, gprKey) = if (File(".gradle/gradle.properties").exists()) {
|
||||||
|
File(".gradle/gradle.properties").inputStream().use {
|
||||||
|
java.util.Properties().apply { load(it) }.let {
|
||||||
|
it.getProperty("gpr.user") to it.getProperty("gpr.key")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
null to null
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
google()
|
google()
|
||||||
@ -7,13 +18,24 @@ pluginManagement {
|
|||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
credentials {
|
credentials {
|
||||||
username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
username = gprUser ?: providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
||||||
password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
password = gprKey ?: providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
|
// TODO: remove this once https://github.com/gradle/gradle/issues/23572 is fixed
|
||||||
|
val (gprUser, gprKey) = if (File(".gradle/gradle.properties").exists()) {
|
||||||
|
File(".gradle/gradle.properties").inputStream().use {
|
||||||
|
java.util.Properties().apply { load(it) }.let {
|
||||||
|
it.getProperty("gpr.user") to it.getProperty("gpr.key")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
null to null
|
||||||
|
}
|
||||||
|
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -22,8 +44,8 @@ dependencyResolutionManagement {
|
|||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
credentials {
|
credentials {
|
||||||
username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
username = gprUser ?: providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
||||||
password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
password = gprKey ?: providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user