diff --git a/app/build.gradle b/app/build.gradle index b88dfae..be8a9b7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,16 @@ +buildscript { + repositories { + gradlePluginPortal() + } + dependencies { + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.19' + } +} + plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id "com.google.protobuf" version "0.8.19" } android { @@ -46,7 +56,6 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.7.0' implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.material3:material3:1.0.0-alpha15" @@ -60,4 +69,24 @@ dependencies { androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" +} + +protobuf { + protoc { + // You still need protoc like in the non-Android case + artifact = 'com.google.protobuf:protoc:3.21.5' + } + generateProtoTasks { + all().each { task -> + task.plugins { + java { + option "lite" + } + } + } + } +} + +dependencies { + implementation 'com.google.protobuf:protobuf-javalite:3.21.5' } \ No newline at end of file diff --git a/app/src/main/proto/test.proto b/app/src/main/proto/test.proto new file mode 100644 index 0000000..a000f2e --- /dev/null +++ b/app/src/main/proto/test.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +option java_package = "io.zeitmaschine.zimzync"; +option java_multiple_files = true; + +message Test { + string url = 1; + string key = 2; + string secret = 3; +}