// // Copyright (C) 2023 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. // package { // See: http://go/android-license-faq default_applicable_licenses: ["Android-Apache-2.0"], } cc_library_shared { name: "libpdfclient", srcs: [ "*.cc", "utils/*.cc", ], exclude_srcs: [ "*_test.cc", ], shared_libs: [ "liblog", "libjnigraphics", "libdl", "libft2", "libicu", "libjpeg", "libz", ], static_libs: [ "libbase_ndk", "libpdfium_static", ], cflags: [ "-Werror", "-Wno-unused-parameter", ], ldflags: [ // Matches libpdfium flags. "-Wl,-icf=all", ], version_script: "jni.lds", sdk_version: "current", min_sdk_version: "apex_inherit", apex_available: ["com.android.mediaprovider"], stl: "c++_static", header_libs: ["jni_headers"], } filegroup { name: "pdfClient_test_default_map", srcs: ["pdfClient_test_default.map"], } cc_test { name: "pdfClient_test", compile_multilib: "both", multilib: { lib32: { suffix: "32", }, lib64: { suffix: "64", }, }, srcs: [ "*.cc", "utils/*.cc", "testing/*.cc", ], test_config: "pdfClient_test_config.xml", // These tests run on older platform versions, so many libraries (such as libbase and libc++) // need to be linked statically. The tests also need to be linked with a version script to // ensure that the statically-linked library isn't exported from the executable, where it // would override the shared libraries that the platform itself uses. // See http://b/333438055 for an example of what goes wrong when libc++ is partially exported // from an executable. version_script: ":pdfClient_test_default_map", data: [ "testdata/**/*.pdf", ], test_suites: [ "device-tests", "mts-mediaprovider", ], static_libs: [ "libbase_ndk", ], shared_libs: [ "libpdfium", "liblog", ], cflags: [ "-Werror", "-Wno-unused-parameter", "-Wmacro-redefined", ], sdk_version: "current", stl: "c++_static", header_libs: ["jni_headers"], }