summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gradle.properties7
-rw-r--r--tunnel/build.gradle.kts10
-rw-r--r--ui/build.gradle.kts6
3 files changed, 14 insertions, 9 deletions
diff --git a/gradle.properties b/gradle.properties
index d300054d..2f36d71e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,7 @@
+wireguardVersionCode=501
+wireguardVersionName=1.0.20230502
+wireguardPackageName=com.wireguard.android
+
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -63,9 +67,6 @@ android.suppressUnsupportedOptionWarnings=android.keepWorkerActionServicesBetwee
android.enableAppCompileTimeRClass,\
android.suppressUnsupportedOptionWarnings
-wireguardVersionCode=501
-wireguardVersionName=1.0.20230502
-
# OSSRH sometimes struggles with slow deployments, so this makes Gradle
# more tolerant to those delays.
systemProp.org.gradle.internal.http.connectionTimeout=500000
diff --git a/tunnel/build.gradle.kts b/tunnel/build.gradle.kts
index 63535199..0922d602 100644
--- a/tunnel/build.gradle.kts
+++ b/tunnel/build.gradle.kts
@@ -1,6 +1,8 @@
@file:Suppress("UnstableApiUsage")
import org.gradle.api.tasks.testing.logging.TestLogEvent
+val pkg: String = providers.gradleProperty("wireguardPackageName").get()
+
plugins {
alias(libs.plugins.android.library)
`maven-publish`
@@ -13,7 +15,7 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
- namespace = "com.wireguard.android.tunnel"
+ namespace = "${pkg}.tunnel"
defaultConfig {
minSdk = 21
}
@@ -37,14 +39,14 @@ android {
release {
externalNativeBuild {
cmake {
- arguments("-DANDROID_PACKAGE_NAME=com.wireguard.android")
+ arguments("-DANDROID_PACKAGE_NAME=${pkg}")
}
}
}
debug {
externalNativeBuild {
cmake {
- arguments("-DANDROID_PACKAGE_NAME=com.wireguard.android.debug")
+ arguments("-DANDROID_PACKAGE_NAME=${pkg}.debug")
}
}
}
@@ -74,7 +76,7 @@ dependencies {
publishing {
publications {
register<MavenPublication>("release") {
- groupId = "com.wireguard.android"
+ groupId = pkg
artifactId = "tunnel"
version = providers.gradleProperty("wireguardVersionName").get()
afterEvaluate {
diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts
index 8832a358..6b9dfa9e 100644
--- a/ui/build.gradle.kts
+++ b/ui/build.gradle.kts
@@ -2,6 +2,8 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+val pkg: String = providers.gradleProperty("wireguardPackageName").get()
+
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
@@ -15,9 +17,9 @@ android {
dataBinding = true
viewBinding = true
}
- namespace = "com.wireguard.android"
+ namespace = pkg
defaultConfig {
- applicationId = "com.wireguard.android"
+ applicationId = pkg
minSdk = 21
targetSdk = 33
versionCode = providers.gradleProperty("wireguardVersionCode").get().toInt()