You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
3.6 KiB
147 lines
3.6 KiB
//
|
|
// Copyright (C) 2014 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.
|
|
//
|
|
|
|
// ==========================================================
|
|
// Setup some common variables for the different build
|
|
// targets here.
|
|
// ==========================================================
|
|
|
|
package {
|
|
default_applicable_licenses: ["frameworks_base_tools_aapt_license"],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "frameworks_base_tools_aapt_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
],
|
|
license_text: [
|
|
"NOTICE",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "aapt_defaults",
|
|
|
|
static_libs: [
|
|
"libandroidfw",
|
|
"libpng",
|
|
"libutils",
|
|
"liblog",
|
|
"libcutils",
|
|
"libexpat",
|
|
"libziparchive",
|
|
"libbase",
|
|
"libz",
|
|
],
|
|
group_static_libs: true,
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
|
|
target: {
|
|
windows: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
|
|
// This tool is prebuilt if we're doing an app-only build.
|
|
product_variables: {
|
|
pdk: {
|
|
enabled: false,
|
|
},
|
|
unbundled_build: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
}
|
|
|
|
// ==========================================================
|
|
// Build the host static library: libaapt
|
|
// ==========================================================
|
|
cc_library_host_static {
|
|
name: "libaapt",
|
|
defaults: ["aapt_defaults"],
|
|
target: {
|
|
darwin: {
|
|
cflags: ["-D_DARWIN_UNLIMITED_STREAMS"],
|
|
},
|
|
},
|
|
cflags: [
|
|
"-Wno-format-y2k",
|
|
"-DSTATIC_ANDROIDFW_FOR_TOOLS",
|
|
],
|
|
|
|
srcs: [
|
|
"AaptAssets.cpp",
|
|
"AaptConfig.cpp",
|
|
"AaptUtil.cpp",
|
|
"AaptXml.cpp",
|
|
"ApkBuilder.cpp",
|
|
"Command.cpp",
|
|
"CrunchCache.cpp",
|
|
"FileFinder.cpp",
|
|
"Images.cpp",
|
|
"Package.cpp",
|
|
"pseudolocalize.cpp",
|
|
"Resource.cpp",
|
|
"ResourceFilter.cpp",
|
|
"ResourceIdCache.cpp",
|
|
"ResourceTable.cpp",
|
|
"SourcePos.cpp",
|
|
"StringPool.cpp",
|
|
"WorkQueue.cpp",
|
|
"XMLNode.cpp",
|
|
"ZipEntry.cpp",
|
|
"ZipFile.cpp",
|
|
],
|
|
}
|
|
|
|
// ==========================================================
|
|
// Build the host executable: aapt
|
|
// ==========================================================
|
|
cc_binary_host {
|
|
name: "aapt",
|
|
defaults: ["aapt_defaults"],
|
|
srcs: ["Main.cpp"],
|
|
use_version_lib: true,
|
|
static_libs: ["libaapt"],
|
|
dist: {
|
|
targets: ["aapt2_artifacts"],
|
|
},
|
|
}
|
|
|
|
// ==========================================================
|
|
// Build the host tests: libaapt_tests
|
|
// ==========================================================
|
|
cc_test_host {
|
|
name: "libaapt_tests",
|
|
defaults: ["aapt_defaults"],
|
|
srcs: [
|
|
"tests/AaptConfig_test.cpp",
|
|
"tests/AaptGroupEntry_test.cpp",
|
|
"tests/Pseudolocales_test.cpp",
|
|
"tests/ResourceFilter_test.cpp",
|
|
"tests/ResourceTable_test.cpp",
|
|
],
|
|
static_libs: ["libaapt"],
|
|
}
|