release / build (release) Canceled after 0s
- Rename package and all Java/Kotlin sources: com.wireguard.android -> page.onram.wirevpn - applicationId -> page.onram.wirevpn, version 1.0.20260910 (520) - New launcher icon: dark circle, white padlock with bold W - App name 'Wire VPN' in all locales; remove donate preference - Release signing from KEYSTORE_* env vars (CI) - F-Droid v2: scripts/fdroid_metadata.py - GitHub/Gitea Actions workflow: auto-build signed APK + F-Droid metadata/signature on every new release, attach to the release - README + NOTICE (license inventory)
106 lines
3.5 KiB
Kotlin
106 lines
3.5 KiB
Kotlin
@file:Suppress("UnstableApiUsage")
|
|
|
|
val pkg: String = providers.gradleProperty("wireguardPackageName").get()
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.legacy.kapt)
|
|
}
|
|
|
|
val signingKeystoreFile: String? = providers.environmentVariable("KEYSTORE_FILE").orNull
|
|
val releaseSigningEnabled =
|
|
signingKeystoreFile != null &&
|
|
providers.environmentVariable("KEYSTORE_PASSWORD").orNull != null &&
|
|
providers.environmentVariable("KEY_ALIAS").orNull != null &&
|
|
providers.environmentVariable("KEY_PASSWORD").orNull != null
|
|
|
|
android {
|
|
compileSdk = 36
|
|
buildFeatures {
|
|
buildConfig = true
|
|
dataBinding = true
|
|
viewBinding = true
|
|
}
|
|
namespace = pkg
|
|
signingConfigs {
|
|
if (releaseSigningEnabled) {
|
|
val storeFileRef = requireNotNull(signingKeystoreFile)
|
|
create("release") {
|
|
storeFile = file(storeFileRef)
|
|
storePassword = providers.environmentVariable("KEYSTORE_PASSWORD").get()
|
|
keyAlias = providers.environmentVariable("KEY_ALIAS").get()
|
|
keyPassword = providers.environmentVariable("KEY_PASSWORD").get()
|
|
}
|
|
}
|
|
}
|
|
defaultConfig {
|
|
applicationId = pkg
|
|
minSdk = 24
|
|
versionCode = providers.gradleProperty("wireguardVersionCode").get().toInt()
|
|
versionName = providers.gradleProperty("wireguardVersionName").get()
|
|
buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString())
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
isCoreLibraryDesugaringEnabled = true
|
|
}
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles("proguard-android-optimize.txt")
|
|
if (releaseSigningEnabled) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "DebugProbesKt.bin"
|
|
excludes += "kotlin-tooling-metadata.json"
|
|
excludes += "META-INF/*.version"
|
|
}
|
|
}
|
|
}
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-debug"
|
|
}
|
|
create("googleplay") {
|
|
initWith(getByName("release"))
|
|
matchingFallbacks += "release"
|
|
}
|
|
}
|
|
androidResources {
|
|
generateLocaleConfig = true
|
|
}
|
|
lint {
|
|
disable += "LongLogTag"
|
|
warning += "MissingTranslation"
|
|
warning += "ImpliedQuantity"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":tunnel"))
|
|
implementation(libs.androidx.activity.ktx)
|
|
implementation(libs.androidx.annotation)
|
|
implementation(libs.androidx.appcompat)
|
|
implementation(libs.androidx.constraintlayout)
|
|
implementation(libs.androidx.coordinatorlayout)
|
|
implementation(libs.androidx.biometric)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.fragment.ktx)
|
|
implementation(libs.androidx.preference.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.google.material)
|
|
implementation(libs.zxing.android.embedded)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
coreLibraryDesugaring(libs.desugarJdkLibs)
|
|
}
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.compilerArgs.add("-Xlint:unchecked")
|
|
options.isDeprecation = true
|
|
}
|