From 6d7b3464076b22ac8f7847a3ee97d246fb811a24 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 20 Oct 2017 13:02:56 -0700 Subject: Convert development/tools to Android.bp See build/soong/README.md for more information Also moves rmtypedefs to use the guava prebuilt from prebuilts/misc/common. Test: m checkbuild Change-Id: I9298967275ca40f8d50841b204cd40612a8a5f56 --- tools/Android.bp | 1 + tools/apkcheck/Android.bp | 20 ++++++++++++++++++++ tools/apkcheck/Android.mk | 33 --------------------------------- tools/apkcheck/src/Android.mk | 28 ---------------------------- tools/bugreport/Android.bp | 11 +++++++++++ tools/bugreport/Android.mk | 36 ------------------------------------ tools/etc1tool/Android.bp | 23 +++++++++++++++++++++++ tools/etc1tool/Android.mk | 21 --------------------- tools/hosttestlib/Android.bp | 25 +++++++++++++++++++++++++ tools/hosttestlib/Android.mk | 28 ---------------------------- tools/idegen/Android.bp | 5 +++++ tools/idegen/Android.mk | 12 ------------ tools/line_endings/Android.bp | 8 ++++++++ tools/line_endings/Android.mk | 14 -------------- tools/mkstubs/Android.bp | 22 ++++++++++++++++++++++ tools/mkstubs/Android.mk | 28 ---------------------------- tools/rmtypedefs/Android.bp | 24 ++++++++++++++++++++++++ tools/rmtypedefs/Android.mk | 33 --------------------------------- tools/rmtypedefs/src/Android.mk | 31 ------------------------------- 19 files changed, 139 insertions(+), 264 deletions(-) create mode 100644 tools/Android.bp create mode 100644 tools/apkcheck/Android.bp delete mode 100644 tools/apkcheck/Android.mk delete mode 100644 tools/apkcheck/src/Android.mk create mode 100644 tools/bugreport/Android.bp delete mode 100644 tools/bugreport/Android.mk create mode 100644 tools/etc1tool/Android.bp delete mode 100644 tools/etc1tool/Android.mk create mode 100644 tools/hosttestlib/Android.bp delete mode 100644 tools/hosttestlib/Android.mk create mode 100644 tools/idegen/Android.bp delete mode 100644 tools/idegen/Android.mk create mode 100644 tools/line_endings/Android.bp delete mode 100644 tools/line_endings/Android.mk create mode 100644 tools/mkstubs/Android.bp delete mode 100644 tools/mkstubs/Android.mk create mode 100644 tools/rmtypedefs/Android.bp delete mode 100644 tools/rmtypedefs/Android.mk delete mode 100644 tools/rmtypedefs/src/Android.mk (limited to 'tools') diff --git a/tools/Android.bp b/tools/Android.bp new file mode 100644 index 000000000..b44c29601 --- /dev/null +++ b/tools/Android.bp @@ -0,0 +1 @@ +subdirs = ["*"] diff --git a/tools/apkcheck/Android.bp b/tools/apkcheck/Android.bp new file mode 100644 index 000000000..72997b527 --- /dev/null +++ b/tools/apkcheck/Android.bp @@ -0,0 +1,20 @@ +// Copyright (C) 2010 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_binary_host { + name: "apkcheck", + wrapper: "etc/apkcheck", + manifest: "etc/manifest.txt", + srcs: ["**/*.java"], +} diff --git a/tools/apkcheck/Android.mk b/tools/apkcheck/Android.mk deleted file mode 100644 index 1d7ab4eaf..000000000 --- a/tools/apkcheck/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2010 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) - -# the execution script -# ============================================================ -include $(CLEAR_VARS) -LOCAL_IS_HOST_MODULE := true -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE := apkcheck -LOCAL_SRC_FILES := etc/apkcheck -LOCAL_ADDITIONAL_DEPENDENCIES := $(HOST_OUT_JAVA_LIBRARIES)/apkcheck$(COMMON_JAVA_PACKAGE_SUFFIX) -include $(BUILD_PREBUILT) - -# the other stuff -# ============================================================ -subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \ - src \ - )) - -include $(subdirs) diff --git a/tools/apkcheck/src/Android.mk b/tools/apkcheck/src/Android.mk deleted file mode 100644 index abc813aab..000000000 --- a/tools/apkcheck/src/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2010 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) - - -# apkcheck java library -# ============================================================ -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_JAR_MANIFEST := ../etc/manifest.txt - -LOCAL_MODULE:= apkcheck - -include $(BUILD_HOST_JAVA_LIBRARY) - diff --git a/tools/bugreport/Android.bp b/tools/bugreport/Android.bp new file mode 100644 index 000000000..1144516ee --- /dev/null +++ b/tools/bugreport/Android.bp @@ -0,0 +1,11 @@ +// Copyright 2006 The Android Open Source Project +// + +java_binary_host { + name: "BugReport", + wrapper: "bugreport", + manifest: "manifest-library.mf", + srcs: ["src/**/*.java"], + java_resource_dirs: ["resources"], + static_libs: ["jsilver"], +} diff --git a/tools/bugreport/Android.mk b/tools/bugreport/Android.mk deleted file mode 100644 index 61e21e682..000000000 --- a/tools/bugreport/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2006 The Android Open Source Project -# - -LOCAL_PATH := $(call my-dir) - -# the script -# ============================================================ -include $(CLEAR_VARS) - -LOCAL_IS_HOST_MODULE := true -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE := bugreport - -include $(BUILD_SYSTEM)/base_rules.mk - -$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/bugreport | $(ACP) - @echo "Copy: $(PRIVATE_MODULE) ($@)" - $(copy-file-to-new-target) - $(hide) chmod 755 $@ - - -# the java -# ============================================================ -include $(CLEAR_VARS) - -LOCAL_MODULE := BugReport -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_JAR_MANIFEST := manifest-library.mf -LOCAL_MODULE_TAGS := optional -LOCAL_JAVA_RESOURCE_DIRS := resources -LOCAL_STATIC_JAVA_LIBRARIES := \ - jsilver - -include $(BUILD_HOST_JAVA_LIBRARY) - diff --git a/tools/etc1tool/Android.bp b/tools/etc1tool/Android.bp new file mode 100644 index 000000000..77460bf98 --- /dev/null +++ b/tools/etc1tool/Android.bp @@ -0,0 +1,23 @@ +// Copyright 2009 Google Inc. All Rights Reserved. +// +// Android.mk for etc1tool +// + +cc_binary_host { + name: "etc1tool", + + srcs: ["etc1tool.cpp"], + + static_libs: [ + "libexpat", + "libpng", + "libETC1", + "libz", + ], + + target: { + windows: { + enabled: true, + }, + }, +} diff --git a/tools/etc1tool/Android.mk b/tools/etc1tool/Android.mk deleted file mode 100644 index 61b62f034..000000000 --- a/tools/etc1tool/Android.mk +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2009 Google Inc. All Rights Reserved. -# -# Android.mk for etc1tool -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := etc1tool.cpp - -LOCAL_STATIC_LIBRARIES := \ - libexpat \ - libpng \ - libETC1 \ - libz - -LOCAL_MODULE := etc1tool -LOCAL_MODULE_HOST_OS := darwin linux windows - -include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/hosttestlib/Android.bp b/tools/hosttestlib/Android.bp new file mode 100644 index 000000000..e95e34310 --- /dev/null +++ b/tools/hosttestlib/Android.bp @@ -0,0 +1,25 @@ +// Copyright (C) 2009 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_host { + name: "hosttestlib", + + // Only compile source java files in this lib. + srcs: ["src/**/*.java"], + + libs: [ + "ddmlib-prebuilt", + "junit", + ], +} diff --git a/tools/hosttestlib/Android.mk b/tools/hosttestlib/Android.mk deleted file mode 100644 index 689018552..000000000 --- a/tools/hosttestlib/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2009 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) - -# Only compile source java files in this lib. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_MODULE := hosttestlib - -LOCAL_JAVA_LIBRARIES := ddmlib-prebuilt junit-host - -include $(BUILD_HOST_JAVA_LIBRARY) - - diff --git a/tools/idegen/Android.bp b/tools/idegen/Android.bp new file mode 100644 index 000000000..5e57fe0cd --- /dev/null +++ b/tools/idegen/Android.bp @@ -0,0 +1,5 @@ +java_library_host { + name: "idegen", + srcs: ["**/*.java"], + static_libs: ["guava"], +} diff --git a/tools/idegen/Android.mk b/tools/idegen/Android.mk deleted file mode 100644 index 8771160dd..000000000 --- a/tools/idegen/Android.mk +++ /dev/null @@ -1,12 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_STATIC_JAVA_LIBRARIES := guavalib - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_MODULE:= idegen - -include $(BUILD_HOST_JAVA_LIBRARY) - diff --git a/tools/line_endings/Android.bp b/tools/line_endings/Android.bp new file mode 100644 index 000000000..4e713ebaa --- /dev/null +++ b/tools/line_endings/Android.bp @@ -0,0 +1,8 @@ +// Copyright 2007 The Android Open Source Project +// +// Copies files into the directory structure described by a manifest + +cc_binary_host { + name: "line_endings", + srcs: ["line_endings.c"], +} diff --git a/tools/line_endings/Android.mk b/tools/line_endings/Android.mk deleted file mode 100644 index e3902ae25..000000000 --- a/tools/line_endings/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2007 The Android Open Source Project -# -# Copies files into the directory structure described by a manifest - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - line_endings.c - -LOCAL_MODULE := line_endings - -include $(BUILD_HOST_EXECUTABLE) - diff --git a/tools/mkstubs/Android.bp b/tools/mkstubs/Android.bp new file mode 100644 index 000000000..cdc57ffa3 --- /dev/null +++ b/tools/mkstubs/Android.bp @@ -0,0 +1,22 @@ +// +// Copyright (C) 2009 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_host { + name: "mkstubs", + srcs: ["src/**/*.java"], + manifest: "manifest.txt", + static_libs: ["asm-5.2"], +} diff --git a/tools/mkstubs/Android.mk b/tools/mkstubs/Android.mk deleted file mode 100644 index ddc9dd818..000000000 --- a/tools/mkstubs/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2009 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_SRC_FILES := $(call all-java-files-under,src) - -LOCAL_JAR_MANIFEST := manifest.txt -LOCAL_STATIC_JAVA_LIBRARIES := \ - asm-5.2 - -LOCAL_MODULE := mkstubs - -include $(BUILD_HOST_JAVA_LIBRARY) - diff --git a/tools/rmtypedefs/Android.bp b/tools/rmtypedefs/Android.bp new file mode 100644 index 000000000..1b64f4710 --- /dev/null +++ b/tools/rmtypedefs/Android.bp @@ -0,0 +1,24 @@ +// Copyright (C) 2013 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_binary_host { + name: "rmtypedefs", + srcs: ["src/**/*.java"], + manifest: "etc/manifest.txt", + wrapper: "etc/rmtypedefs", + static_libs: [ + "asm-5.2", + "guava-21.0", + ], +} diff --git a/tools/rmtypedefs/Android.mk b/tools/rmtypedefs/Android.mk deleted file mode 100644 index d3caaa1ab..000000000 --- a/tools/rmtypedefs/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013 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) - -# the execution script -# ============================================================ -include $(CLEAR_VARS) -LOCAL_IS_HOST_MODULE := true -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE := rmtypedefs -LOCAL_SRC_FILES := etc/rmtypedefs -LOCAL_ADDITIONAL_DEPENDENCIES := $(HOST_OUT_JAVA_LIBRARIES)/rmtypedefs$(COMMON_JAVA_PACKAGE_SUFFIX) -include $(BUILD_PREBUILT) - -# the other stuff -# ============================================================ -subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \ - src \ - )) - -include $(subdirs) diff --git a/tools/rmtypedefs/src/Android.mk b/tools/rmtypedefs/src/Android.mk deleted file mode 100644 index dfa8cc827..000000000 --- a/tools/rmtypedefs/src/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2013 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) - - -# rmtypedefs java library -# ============================================================ -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_JAR_MANIFEST := ../etc/manifest.txt -LOCAL_STATIC_JAVA_LIBRARIES := \ - asm-5.2 \ - guava-tools - -LOCAL_MODULE:= rmtypedefs - -include $(BUILD_HOST_JAVA_LIBRARY) - -- cgit v1.2.3