wgtunnel/settings.gradle.kts

44 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-05-24 01:33:20 -04:00
pluginManagement {
repositories {
2024-03-11 12:39:00 -04:00
mavenLocal()
2023-05-24 01:33:20 -04:00
google()
mavenCentral()
gradlePluginPortal()
}
}
val GITHUB_USER_VAR = "GH_USER"
val GITHUB_TOKEN_VAR = "GH_TOKEN"
2023-05-24 01:33:20 -04:00
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
2024-03-11 12:39:00 -04:00
mavenLocal()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/zaneschepke/wireguard-android")
credentials {
username = getLocalProperty(GITHUB_USER_VAR) ?: System.getenv(GITHUB_USER_VAR)
password = getLocalProperty(GITHUB_TOKEN_VAR) ?: System.getenv(GITHUB_TOKEN_VAR)
}
}
2023-05-24 01:33:20 -04:00
google()
mavenCentral()
}
}
fun getLocalProperty(key: String, file: String = "local.properties"): String? {
val properties = java.util.Properties()
val localProperties = File(file)
if (localProperties.isFile) {
java.io.InputStreamReader(java.io.FileInputStream(localProperties), Charsets.UTF_8).use { reader ->
properties.load(reader)
}
} else return null
return properties.getProperty(key)
}
2023-05-24 01:33:20 -04:00
rootProject.name = "WG Tunnel"
2023-05-24 01:33:20 -04:00
include(":app")