diff options
author | Omar Ismail <omarismail@google.com> | 2024-04-18 13:44:27 -0400 |
---|---|---|
committer | Omar Ismail <omarismail@google.com> | 2024-04-18 13:54:42 -0400 |
commit | 431bded8e1a0df936b17526a345d5688efad2009 (patch) | |
tree | 761b6d15a17d40a538957690b304af18b3e07a2f | |
parent | a81a0c8cb5c424e6eed6cec1bd687bc4d609e6cd (diff) | |
download | icing-431bded8e1a0df936b17526a345d5688efad2009.tar.gz |
Repackage icing lib using AndroidXRepackagePlugin without protobuf runtimeandroidx-viewpager2-release
BUG: 296864329
TESTED: Ran ./gradlew :appsearch:appsearch-local-storage:cC and it worked. Also published the appsearch-local-storage project, and when viewing the AAR, it contained the bundled icing lib, without the protobuf runtime
Change-Id: I59b78db63403ffe960f5df294e8646eae338b112
-rw-r--r-- | build.gradle | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index d0d1a39..97cc5e1 100644 --- a/build.gradle +++ b/build.gradle @@ -18,10 +18,19 @@ import androidx.build.SdkHelperKt plugins { id("AndroidXPlugin") + id("AndroidXRepackagePlugin") id("java-library") id("com.google.protobuf") } +repackage { + // Must match what is in frameworks/support/appsearch/appsearch-external-protobuf/build.gradle + addRelocation { + sourcePackage = "com.google.protobuf" + targetPackage = "com.google.android.icing.protobuf" + } +} + sourceSets { main { java.srcDir 'java/src/' @@ -32,7 +41,7 @@ sourceSets { dependencies { compileOnly("androidx.annotation:annotation:1.1.0") compileOnly(SdkHelperKt.getSdkDependency(project)) - implementation(libs.protobufLite) + compileOnly(libs.protobufLite) } afterEvaluate { |