diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | build.gradle | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 48a63d4..4b7c752 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.10.2) +cmake_minimum_required(VERSION 3.22.1) project(icing) 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 { |