feat: migrate secret management to datastore proto and tink
This commit is contained in:
+40
-1
@@ -1,7 +1,17 @@
|
||||
import com.google.protobuf.gradle.*
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force("com.google.protobuf:protobuf-javalite:${libs.versions.protobuf.get()}")
|
||||
force("com.google.protobuf:protobuf-kotlin-lite:${libs.versions.protobuf.get()}")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.protobuf)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -39,6 +49,13 @@ android {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
}
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
proto {
|
||||
srcDir("src/main/proto")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -72,6 +89,11 @@ dependencies {
|
||||
implementation(libs.androidx.lifecycle.viewmodel.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
|
||||
// DataStore + Proto + Tink
|
||||
implementation(libs.datastore.proto)
|
||||
implementation(libs.protobuf.kotlin.lite)
|
||||
implementation(libs.tink.android)
|
||||
|
||||
// DataStore
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
|
||||
@@ -99,5 +121,22 @@ dependencies {
|
||||
|
||||
// animations
|
||||
implementation(libs.androidx.compose.animation)
|
||||
}
|
||||
|
||||
}
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = libs.protobuf.protoc.get().toString()
|
||||
}
|
||||
generateProtoTasks {
|
||||
all().configureEach { // no "task ->" here
|
||||
builtins {
|
||||
id("java") {
|
||||
option("lite")
|
||||
}
|
||||
id("kotlin") {
|
||||
option("lite")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user