From a0994a80d10a61ba6a5136e36da23955ce90bd6a Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Mon, 11 Feb 2019 15:29:47 -0800 Subject: [PATCH] Convert Android.mk file to Android.bp See build/soong/README.md for more information. Bug: 122332340 Test: treehugger Change-Id: I89cb31814f1442c91c31e5b867501d768679230e --- tools/aapt2/integration-tests/Android.mk | 2 -- .../AutoVersionTest/Android.bp | 20 +++++++++++ .../AutoVersionTest/Android.mk | 24 ------------- .../integration-tests/BasicTest/Android.bp | 20 +++++++++++ .../integration-tests/BasicTest/Android.mk | 24 ------------- .../StaticLibTest/Android.mk | 2 -- .../StaticLibTest/App/Android.bp | 34 +++++++++++++++++++ .../StaticLibTest/App/Android.mk | 30 ---------------- .../StaticLibTest/LibOne/Android.bp | 22 ++++++++++++ .../StaticLibTest/LibOne/Android.mk | 29 ---------------- .../StaticLibTest/LibTwo/Android.bp | 23 +++++++++++++ .../StaticLibTest/LibTwo/Android.mk | 28 --------------- .../integration-tests/SymlinkTest/Android.bp | 20 +++++++++++ .../integration-tests/SymlinkTest/Android.mk | 24 ------------- 14 files changed, 139 insertions(+), 163 deletions(-) delete mode 100644 tools/aapt2/integration-tests/Android.mk create mode 100644 tools/aapt2/integration-tests/AutoVersionTest/Android.bp delete mode 100644 tools/aapt2/integration-tests/AutoVersionTest/Android.mk create mode 100644 tools/aapt2/integration-tests/BasicTest/Android.bp delete mode 100644 tools/aapt2/integration-tests/BasicTest/Android.mk delete mode 100644 tools/aapt2/integration-tests/StaticLibTest/Android.mk create mode 100644 tools/aapt2/integration-tests/StaticLibTest/App/Android.bp delete mode 100644 tools/aapt2/integration-tests/StaticLibTest/App/Android.mk create mode 100644 tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp delete mode 100644 tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk create mode 100644 tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp delete mode 100644 tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk create mode 100644 tools/aapt2/integration-tests/SymlinkTest/Android.bp delete mode 100644 tools/aapt2/integration-tests/SymlinkTest/Android.mk diff --git a/tools/aapt2/integration-tests/Android.mk b/tools/aapt2/integration-tests/Android.mk deleted file mode 100644 index 6361f9b8ae7d7..0000000000000 --- a/tools/aapt2/integration-tests/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tools/aapt2/integration-tests/AutoVersionTest/Android.bp b/tools/aapt2/integration-tests/AutoVersionTest/Android.bp new file mode 100644 index 0000000000000..79fb5734cd689 --- /dev/null +++ b/tools/aapt2/integration-tests/AutoVersionTest/Android.bp @@ -0,0 +1,20 @@ +// +// Copyright (C) 2017 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: "AaptAutoVersionTest", + sdk_version: "current", +} diff --git a/tools/aapt2/integration-tests/AutoVersionTest/Android.mk b/tools/aapt2/integration-tests/AutoVersionTest/Android.mk deleted file mode 100644 index 03cce3534a4ef..0000000000000 --- a/tools/aapt2/integration-tests/AutoVersionTest/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (C) 2017 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_PACKAGE_NAME := AaptAutoVersionTest -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -include $(BUILD_PACKAGE) diff --git a/tools/aapt2/integration-tests/BasicTest/Android.bp b/tools/aapt2/integration-tests/BasicTest/Android.bp new file mode 100644 index 0000000000000..a94a01f12c9e7 --- /dev/null +++ b/tools/aapt2/integration-tests/BasicTest/Android.bp @@ -0,0 +1,20 @@ +// +// Copyright (C) 2017 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: "AaptBasicTest", + sdk_version: "current", +} diff --git a/tools/aapt2/integration-tests/BasicTest/Android.mk b/tools/aapt2/integration-tests/BasicTest/Android.mk deleted file mode 100644 index d1605540371e3..0000000000000 --- a/tools/aapt2/integration-tests/BasicTest/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (C) 2017 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_PACKAGE_NAME := AaptBasicTest -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -include $(BUILD_PACKAGE) diff --git a/tools/aapt2/integration-tests/StaticLibTest/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/Android.mk deleted file mode 100644 index 6361f9b8ae7d7..0000000000000 --- a/tools/aapt2/integration-tests/StaticLibTest/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tools/aapt2/integration-tests/StaticLibTest/App/Android.bp b/tools/aapt2/integration-tests/StaticLibTest/App/Android.bp new file mode 100644 index 0000000000000..9aadff3d619ec --- /dev/null +++ b/tools/aapt2/integration-tests/StaticLibTest/App/Android.bp @@ -0,0 +1,34 @@ +// +// Copyright (C) 2016 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: "AaptTestStaticLib_App", + sdk_version: "current", + srcs: ["src/**/*.java"], + asset_dirs: [ + "assets", + "assets2", + ], + static_libs: [ + "AaptTestStaticLib_LibOne", + "AaptTestStaticLib_LibTwo", + ], + aaptflags: [ + "--no-version-vectors", + "--no-version-transitions", + ], +} diff --git a/tools/aapt2/integration-tests/StaticLibTest/App/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/App/Android.mk deleted file mode 100644 index 3cce35de6a316..0000000000000 --- a/tools/aapt2/integration-tests/StaticLibTest/App/Android.mk +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (C) 2016 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_PACKAGE_NAME := AaptTestStaticLib_App -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -LOCAL_SRC_FILES := $(call all-java-files-under,src) -LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets $(LOCAL_PATH)/assets2 -LOCAL_STATIC_ANDROID_LIBRARIES := \ - AaptTestStaticLib_LibOne \ - AaptTestStaticLib_LibTwo -LOCAL_AAPT_FLAGS := --no-version-vectors --no-version-transitions -include $(BUILD_PACKAGE) diff --git a/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp b/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp new file mode 100644 index 0000000000000..4c8181343a33c --- /dev/null +++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp @@ -0,0 +1,22 @@ +// +// Copyright (C) 2016 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_library { + name: "AaptTestStaticLib_LibOne", + sdk_version: "current", + srcs: ["src/**/*.java"], + resource_dirs: ["res"], +} diff --git a/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk deleted file mode 100644 index da25f6477b08d..0000000000000 --- a/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2016 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_MODULE := AaptTestStaticLib_LibOne -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -LOCAL_SRC_FILES := $(call all-java-files-under,src) -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -# We need this to compile the Java sources of AaptTestStaticLib_LibTwo using javac. -LOCAL_JAR_EXCLUDE_FILES := none -include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp new file mode 100644 index 0000000000000..7c4f7ed90e694 --- /dev/null +++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp @@ -0,0 +1,23 @@ +// +// Copyright (C) 2016 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_library { + name: "AaptTestStaticLib_LibTwo", + sdk_version: "current", + srcs: ["src/**/*.java"], + resource_dirs: ["res"], + libs: ["AaptTestStaticLib_LibOne"], +} diff --git a/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk deleted file mode 100644 index 27a3134e6ffa0..0000000000000 --- a/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2016 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_MODULE := AaptTestStaticLib_LibTwo -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -LOCAL_SRC_FILES := $(call all-java-files-under,src) -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_SHARED_ANDROID_LIBRARIES := AaptTestStaticLib_LibOne -include $(BUILD_STATIC_JAVA_LIBRARY) - diff --git a/tools/aapt2/integration-tests/SymlinkTest/Android.bp b/tools/aapt2/integration-tests/SymlinkTest/Android.bp new file mode 100644 index 0000000000000..68e6148e480c1 --- /dev/null +++ b/tools/aapt2/integration-tests/SymlinkTest/Android.bp @@ -0,0 +1,20 @@ +// +// Copyright (C) 2017 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: "AaptSymlinkTest", + sdk_version: "current", +} diff --git a/tools/aapt2/integration-tests/SymlinkTest/Android.mk b/tools/aapt2/integration-tests/SymlinkTest/Android.mk deleted file mode 100644 index 8da1141df7b35..0000000000000 --- a/tools/aapt2/integration-tests/SymlinkTest/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (C) 2017 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_PACKAGE_NAME := AaptSymlinkTest -LOCAL_SDK_VERSION := current -LOCAL_MODULE_TAGS := tests -include $(BUILD_PACKAGE)