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()
|
|
|
|
}
|
|
|
|
}
|
2024-01-06 04:06:21 -05:00
|
|
|
|
2024-02-18 23:28:06 -05:00
|
|
|
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()
|
2024-02-18 23:28:06 -05:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-18 23:28:06 -05:00
|
|
|
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"
|
2024-01-06 04:06:21 -05:00
|
|
|
|
2023-05-24 01:33:20 -04:00
|
|
|
include(":app")
|