diff options
author | Alexander Dorokhine <adorokhine@google.com> | 2020-06-05 14:24:44 -0700 |
---|---|---|
committer | Alexander Dorokhine <adorokhine@google.com> | 2021-09-21 02:14:52 +0000 |
commit | 8555f998fccca3aea3f6f67d44fce04775ddea97 (patch) | |
tree | 5c95e1b55907fc46aa237ee19cc98a3ccdf4845c | |
parent | 8d15dee359511993779f4b82a5a830dbf36ec1a5 (diff) | |
download | icing-8555f998fccca3aea3f6f67d44fce04775ddea97.tar.gz |
Remove non-upstream files from upstream-master.
These files should exist only on the development branches.
Change-Id: I0ee7d5d0729de6f09cd3f782b99caea1fe9a9916
-rw-r--r-- | Android.bp | 101 | ||||
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 121 | ||||
-rw-r--r-- | TEST_MAPPING | 12 | ||||
-rw-r--r-- | build.gradle | 87 | ||||
-rw-r--r-- | jarjar-rules.txt | 1 | ||||
-rw-r--r-- | java/Android.bp | 22 | ||||
-rw-r--r-- | java/tests/instrumentation/Android.bp | 42 |
8 files changed, 0 insertions, 388 deletions
diff --git a/Android.bp b/Android.bp deleted file mode 100644 index 7982c4f..0000000 --- a/Android.bp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2019 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -java_library { - name: "icing-java-proto-lite", - proto: { - // If you change the proto type, also update jarjar-rules.txt to match - // the corresponding proto lib's package path. - type: "lite", - include_dirs: ["external/protobuf/src"], - canonical_path_from_root: false, - }, - srcs: ["icing/proto/*.proto"], - jarjar_rules: "jarjar-rules.txt", - sdk_version: "core_current", -} - -cc_defaults { - name: "libicing_defaults", - - // For debug / treemap purposes. - //strip: { - // keep_symbols: true, - //}, - - cflags: [ - "-Wall", - "-Werror", - "-Wextra", - "-Wno-deprecated-declarations", - "-Wno-ignored-qualifiers", - "-Wno-missing-field-initializers", - "-Wno-sign-compare", - "-Wno-tautological-constant-out-of-range-compare", - "-Wno-undefined-var-template", - "-Wno-unused-function", - "-Wno-unused-parameter", - "-Wno-extern-c-compat", - - "-funsigned-char", - "-fvisibility=hidden", - ], -} - -cc_library_static { - name: "icing-c-proto", - defaults: ["libicing_defaults"], - proto: { - type: "lite", - // Find protos relative from where they're specified (useful for external protos) - canonical_path_from_root: false, - // Need to be able to see the .pb.h files that are generated - export_proto_headers: true, - }, - srcs: ["icing/**/*.proto"], -} - -cc_library_shared { - name: "libicing_jni", - defaults: ["libicing_defaults"], - srcs: [ - "icing/**/*.cc", - ], - exclude_srcs: [ - // Tests - "icing/**/*_test.cc", - // Benchmarks - "icing/**/*_benchmark.cc", - // Test-only related files (i.e. utils) - "icing/testing/**/*", - // Tools for manual debugging/investigating - "icing/tools/**/*", - ], - static_libs: [ - "icing-c-proto", - "libutf", - ], - shared_libs: [ - "libandroidicu", - "liblog", - // TODO(b/147509515): We only need the full version for GzipStream. If we can remove - // that dependency, then we can just use libprotobuf-cpp-lite - "libprotobuf-cpp-full", - "libz", - ], - - version_script: "icing/jni.lds", -} - -// TODO(cassiewang): Add build rules and a TEST_MAPPING for cc_tests diff --git a/AndroidManifest.xml b/AndroidManifest.xml deleted file mode 100644 index 7377c53..0000000 --- a/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest package="com.google.android.icing" /> diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 556150a..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2020 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required(VERSION 3.10.2) - -# Build protoc with a host configuration. We need to run it on the host to create our proto -# files. -set(CMAKE_HOST_ARGS - -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} - -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR} - -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}) - -set(Protobuf_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../protobuf") -set(Protobuf_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf-host") -# Run another cmake invocation to configure the protobuf project -execute_process( - COMMAND "${CMAKE_COMMAND}" - ${CMAKE_HOST_ARGS} - -H${Protobuf_SOURCE_DIR}/cmake - -B${Protobuf_BINARY_DIR} - -Dprotobuf_BUILD_TESTS:BOOL=OFF - RESULT_VARIABLE exec_value - OUTPUT_VARIABLE exec_output - ERROR_VARIABLE exec_output -) -message("Result of proto configuration: ${exec_value}. Output: ${exec_output}") - -# Run the actual build tool (ninja) to compile protoc for the host -execute_process( - COMMAND "${CMAKE_MAKE_PROGRAM}" protoc - WORKING_DIRECTORY ${Protobuf_BINARY_DIR} - RESULT_VARIABLE exec_value - OUTPUT_VARIABLE exec_output - ERROR_VARIABLE exec_output -) -message("Result of proto build: ${exec_value}. Output: ${exec_output}") - -# Glob Icing proto sources -file( - GLOB_RECURSE - Icing_PROTO_FILES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - "icing/*.proto") -message(STATUS "Icing_PROTO_FILES=${Icing_PROTO_FILES}") - -# Run protoc on Icing_PROTO_FILES to generate pb.cc and pb.h files -set(Icing_PROTO_GEN_DIR "${PROTO_GENERATED_FILES_BASE_DIR}/cpp") -file(MAKE_DIRECTORY ${Icing_PROTO_GEN_DIR}) -foreach(FILE ${Icing_PROTO_FILES}) - # Find the name of the proto file without the .proto extension - string(REGEX REPLACE "\.proto$" "" FILE_NOEXT ${FILE}) - execute_process( - COMMAND "${Protobuf_BINARY_DIR}/protoc" - --proto_path ${CMAKE_CURRENT_SOURCE_DIR} - --cpp_out ${Icing_PROTO_GEN_DIR} - ${FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE exec_value - OUTPUT_VARIABLE exec_output - ERROR_VARIABLE exec_output - ) - message("Result of protoc ${FILE}: ${exec_value}. Output: ${exec_output}") -endforeach() - -# Glob generated source files from running protoc -file( - GLOB_RECURSE - Icing_PROTO_SOURCES - "${Icing_PROTO_GEN_DIR}/*.pb.cc" - "${Icing_PROTO_GEN_DIR}/*.pb.h" -) -message(STATUS "Icing_PROTO_SOURCES=${Icing_PROTO_SOURCES}") - -# Glob Icing C++ sources -# TODO: When supporting cmake v3.12 or higher, use CONFIGURE_DEPENDS in the glob -# below so that cmake knows when to re-generate the makefiles. -file( - # List files recursively - GLOB_RECURSE - # Store into a variable of this name - Icing_CC_SOURCES - # Return paths that are relative to the project root - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - # Glob expressions - icing/*.cc icing/*.h -) -# Exclude the same types of files as Android.bp. See the comments there. -list(FILTER Icing_CC_SOURCES EXCLUDE REGEX "^icing/.*_test\.cc$") -list(FILTER Icing_CC_SOURCES EXCLUDE REGEX "^icing/.*_benchmark\.cc$") -list(FILTER Icing_CC_SOURCES EXCLUDE REGEX "^icing/testing/.*$") -list(FILTER Icing_CC_SOURCES EXCLUDE REGEX "^icing/tools/.*$") -message(STATUS "Icing_CC_SOURCES=${Icing_CC_SOURCES}") - -add_library( - # .so name - icing - - # Shared or static - SHARED - - # Provides a relative path to your source file(s). - ${Icing_CC_SOURCES} - ${Icing_PROTO_SOURCES} -) -target_include_directories(icing PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(icing PRIVATE ${Icing_PROTO_GEN_DIR}) -target_include_directories(icing PRIVATE "${Protobuf_SOURCE_DIR}/src") diff --git a/TEST_MAPPING b/TEST_MAPPING deleted file mode 100644 index 37cb5fc..0000000 --- a/TEST_MAPPING +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presubmit": [ - { - "name": "IcingSearchEngineTest" - } - ], - "imports": [ - { - "path": "frameworks/base/apex/appsearch/service/java/com/android/server/appsearch" - } - ] -} diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 30265cd..0000000 --- a/build.gradle +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -buildscript { - boolean unbundleBuild = (new File('unbundled-build')).exists() - repositories { - maven { url '../../prebuilts/androidx/external' } - if (unbundleBuild) { - jcenter() - } - } - dependencies { - classpath('gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.8') - } -} - -apply plugin: 'AndroidXPlugin' -apply plugin: 'com.android.library' -apply plugin: 'com.google.protobuf' -apply plugin: 'idea' - -def protoGeneratedFilesBaseDir = "${project.buildDir}/generated/source/proto" - -android { - defaultConfig { - externalNativeBuild { - cmake { - arguments "-DPROTO_GENERATED_FILES_BASE_DIR=${protoGeneratedFilesBaseDir}" - cppFlags "-std=c++17" - arguments "-DCMAKE_VERBOSE_MAKEFILE=ON" - targets "icing" - } - } - } - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - proto { - srcDir '.' - include '**/*.proto' - } - } - } - - externalNativeBuild { - cmake { - version '3.10.2' - // TODO(b/149853706): Uncomment this line once the lib fully compiles under cmake - //path 'CMakeLists.txt' - } - } -} - -dependencies { - api('com.google.protobuf:protobuf-javalite:3.10.0') -} - -protobuf { - generatedFilesBaseDir = protoGeneratedFilesBaseDir - protoc { - artifact = 'com.google.protobuf:protoc:3.10.0' - } - - generateProtoTasks { - all().each { task -> - task.builtins { - java { - option 'lite' - } - } - } - } -} diff --git a/jarjar-rules.txt b/jarjar-rules.txt deleted file mode 100644 index 0f4292e..0000000 --- a/jarjar-rules.txt +++ /dev/null @@ -1 +0,0 @@ -rule com.google.protobuf.** com.google.android.icing.protobuf.@1 diff --git a/java/Android.bp b/java/Android.bp deleted file mode 100644 index 6bc8836..0000000 --- a/java/Android.bp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2020 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -java_library { - name: "libicing-java", - srcs: ["src/**/*.java"], - static_libs: [ - "icing-java-proto-lite", - "libprotobuf-java-lite", - ], -} diff --git a/java/tests/instrumentation/Android.bp b/java/tests/instrumentation/Android.bp deleted file mode 100644 index c941acf..0000000 --- a/java/tests/instrumentation/Android.bp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2019 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -android_test { - name: "IcingSearchEngineTest", - - manifest: "AndroidManifest.xml", - - srcs: [ - "src/**/*.java", - ], - - static_libs: [ - "androidx.test.ext.junit", - "androidx.test.rules", - "androidx.test.ext.truth", - "libicing-java", - "icing-java-proto-lite", - ], - - jni_libs: [ - "libicing_jni", - ], - - test_suites: [ - "device-tests", - ], - - platform_apis: true, - use_embedded_native_libs: true, -} |