Skip to content

Commit

Permalink
Add protobuf-kotlin-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
grote committed Sep 6, 2024
1 parent 13a90c5 commit b0c167e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ android_app {
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
// app backup related libs
"seedvault-lib-protobuf-kotlin-lite",
"seedvault-lib-kotlin-logging-jvm",
"seedvault-lib-chunker"
"seedvault-lib-zstd-jni",
Expand Down
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ android {
id("java") {
option("lite")
}
id("kotlin") {
option("lite")
}
}
}
}
Expand Down Expand Up @@ -177,6 +180,7 @@ dependencies {
implementation(fileTree("${rootProject.rootDir}/libs/koin-android").include("*.jar"))
implementation(fileTree("${rootProject.rootDir}/libs/koin-android").include("*.aar"))

implementation(fileTree("${rootProject.rootDir}/libs").include("protobuf-kotlin-lite-3.21.12.jar"))
implementation(fileTree("${rootProject.rootDir}/libs").include("seedvault-chunker-0.1.jar"))
implementation(fileTree("${rootProject.rootDir}/libs").include("zstd-jni-1.5.6-5.aar"))
implementation(fileTree("${rootProject.rootDir}/libs").include("kotlin-bip39-jvm-1.0.6.jar"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceFragmentCompat.OnPreferenceStartFragmentCallback
import com.stevesoltys.seedvault.R
import com.stevesoltys.seedvault.proto.SnapshotKt.apk
import com.stevesoltys.seedvault.proto.copy
import com.stevesoltys.seedvault.proto.snapshot
import com.stevesoltys.seedvault.ui.RequireProvisioningActivity
import com.stevesoltys.seedvault.ui.RequireProvisioningViewModel
import com.stevesoltys.seedvault.ui.recoverycode.ARG_FOR_NEW_CODE
Expand All @@ -28,6 +31,19 @@ class SettingsActivity : RequireProvisioningActivity(), OnPreferenceStartFragmen
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

val s = snapshot {
token = 23
}
s.copy {
name = "bar"
}
val a = apk {
versionCode = 42
}
a.copy {
installer = "foo"
}

setContentView(R.layout.activity_fragment_container)

setSupportActionBar(requireViewById(R.id.toolbar))
Expand Down
6 changes: 6 additions & 0 deletions libs/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ android_library_import {
extract_jni: true,
}

java_import {
name: "seedvault-lib-protobuf-kotlin-lite",
jars: ["protobuf-kotlin-lite-3.21.12.jar"],
sdk_version: "current",
}

java_import {
name: "seedvault-lib-kotlin-bip39",
jars: ["kotlin-bip39-jvm-1.0.6.jar"],
Expand Down

0 comments on commit b0c167e

Please sign in to comment.