From f7ed38182d5fdd101b02279e9aa879b38751154d Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Thu, 25 May 2023 21:17:52 +0200 Subject: [PATCH] Add protobuf generated sources to the sourceSets And update to version 3.23.4. --- core/datastore/build.gradle.kts | 7 +++++++ gradle/libs.versions.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index a9ec7a78f..d6ca7ebcd 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -52,6 +52,13 @@ protobuf { } } +androidComponents.beforeVariants { + android.sourceSets.register(it.name) { + java.srcDir(buildDir.resolve("generated/source/proto/${it.name}/java")) + kotlin.srcDir(buildDir.resolve("generated/source/proto/${it.name}/kotlin")) + } +} + dependencies { implementation(project(":core:common")) implementation(project(":core:model")) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index be13af451..bb356f006 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,7 +45,7 @@ kotlinxSerializationJson = "1.5.1" ksp = "1.9.0-1.0.11" lint = "30.3.1" okhttp = "4.10.0" -protobuf = "3.23.0" +protobuf = "3.23.4" protobufPlugin = "0.9.3" retrofit = "2.9.0" retrofitKotlinxSerializationJson = "1.0.0"