diff options
| author | Kalle Lindström <karl.lindstrom@mullvad.net> | 2024-12-19 13:19:26 +0100 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-12-19 13:29:41 +0100 |
| commit | 32e72469d5287af2e38231d69f078b98fb651bf4 (patch) | |
| tree | 221c91dfa86c2aadcabbdc78e4059e2be4092476 /android/app | |
| parent | 83b08bf485a753f63d8dbe6101740f42efda6bc4 (diff) | |
| download | mullvadvpn-32e72469d5287af2e38231d69f078b98fb651bf4.tar.xz mullvadvpn-32e72469d5287af2e38231d69f078b98fb651bf4.zip | |
Add proto datastore dependency
Diffstat (limited to 'android/app')
| -rw-r--r-- | android/app/build.gradle.kts | 28 | ||||
| -rw-r--r-- | android/app/src/main/proto/user_prefs.proto | 6 |
2 files changed, 26 insertions, 8 deletions
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index cb5737e3ff..5fed7575d4 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -12,6 +12,7 @@ plugins { alias(libs.plugins.kotlin.parcelize) alias(libs.plugins.kotlin.ksp) alias(libs.plugins.compose) + alias(libs.plugins.protobuf.core) id(Dependencies.junit5AndroidPluginId) version Versions.junit5Plugin } @@ -55,11 +56,7 @@ android { } } - playConfigs { - register("playStagemoleRelease") { - enabled = true - } - } + playConfigs { register("playStagemoleRelease") { enabled = true } } androidResources { @Suppress("UnstableApiUsage") @@ -222,8 +219,7 @@ android { } val variantName = name - val capitalizedVariantName = - variantName.toString().capitalized() + val capitalizedVariantName = variantName.toString().capitalized() val artifactName = "MullvadVPN-${versionName}${artifactSuffix}" tasks.register<Copy>("create${capitalizedVariantName}DistApk") { @@ -316,7 +312,8 @@ tasks.create("printVersion") { play { serviceAccountCredentials.set(file("$credentialsPath/play-api-key.json")) - // Disable for all flavors by default. Only specific flavors should be enabled using PlayConfigs. + // Disable for all flavors by default. Only specific flavors should be enabled using + // PlayConfigs. enabled = false // This property refers to the Publishing API (not git). commit = true @@ -326,6 +323,19 @@ play { userFraction = 1.0 } +protobuf { + protoc { artifact = libs.plugins.protobuf.protoc.get().toString() } + plugins { + create("java") { artifact = libs.plugins.grpc.protoc.gen.grpc.java.get().toString() } + } + generateProtoTasks { + all().forEach { + it.plugins { create("java") { option("lite") } } + it.builtins { create("kotlin") { option("lite") } } + } + } +} + dependencies { implementation(projects.lib.common) implementation(projects.lib.daemonGrpc) @@ -345,6 +355,7 @@ dependencies { implementation(libs.commons.validator) implementation(libs.androidx.activity.compose) + implementation(libs.androidx.datastore) implementation(libs.androidx.ktx) implementation(libs.androidx.coresplashscreen) implementation(libs.androidx.lifecycle.runtime) @@ -370,6 +381,7 @@ dependencies { implementation(libs.kotlin.reflect) implementation(libs.kotlin.stdlib) implementation(libs.kotlinx.coroutines.android) + implementation(libs.protobuf.kotlin.lite) // UI tooling implementation(libs.compose.ui.tooling.preview) diff --git a/android/app/src/main/proto/user_prefs.proto b/android/app/src/main/proto/user_prefs.proto new file mode 100644 index 0000000000..3a7e79285f --- /dev/null +++ b/android/app/src/main/proto/user_prefs.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; + +option java_package = "net.mullvad.mullvadvpn.repository"; +option java_multiple_files = true; + +message UserPreferences { bool is_privacy_disclosure_accepted = 1; } |
