From 2121bfabfe5ca97740d8d3c836781d5d3a53ee8a Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Fri, 13 Jul 2018 12:54:36 -0700 Subject: Convert android-support-multidex-(instrumentation) to Soong Bug: b/70351683 Test: m -j offline-sdk-docs Change-Id: I59951b48511c55285a5123d2fc397f9a5a8b2d8b --- instrumentation/Android.bp | 41 +++++++++++++++++++++++++++++++++++++++++ instrumentation/Android.mk | 34 ---------------------------------- 2 files changed, 41 insertions(+), 34 deletions(-) create mode 100644 instrumentation/Android.bp delete mode 100644 instrumentation/Android.mk (limited to 'instrumentation') diff --git a/instrumentation/Android.bp b/instrumentation/Android.bp new file mode 100644 index 0000000..ce90b2f --- /dev/null +++ b/instrumentation/Android.bp @@ -0,0 +1,41 @@ +// 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. + +genrule { + name: "android-support-multidex-instrumentation-version", + // use srcs as dependencies, otherwise, this module won't be re-run + // during incremental build. + srcs: [ + "src/**/*.java", + ], + cmd: "echo \"git.version=`cd frameworks/multidex/instrumentation; git log --format=\"%H\" -n 1 || " + + "(echo git hash not available; exit 0)`\" > $(genDir)/android-support-multidex-instrumentation.version.txt", + out: [ + "android-support-multidex-instrumentation.version.txt", + ], +} + +java_library_static { + name: "android-support-multidex-instrumentation", + sdk_version: "4", + srcs: [ + "src/**/*.java", + ], + java_resources: [ + ":android-support-multidex-instrumentation-version", + ], + static_libs: [ + "android-support-multidex", + ], +} diff --git a/instrumentation/Android.mk b/instrumentation/Android.mk deleted file mode 100644 index ec50b8c..0000000 --- a/instrumentation/Android.mk +++ /dev/null @@ -1,34 +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) - -include $(CLEAR_VARS) -LOCAL_MODULE := android-support-multidex-instrumentation -LOCAL_JAVA_LIBRARIES := android-support-multidex -LOCAL_SDK_VERSION := 4 -LOCAL_SRC_FILES := $(call all-java-files-under, src) - - -ASMDI_GIT_VERSION_TAG := `cd $(LOCAL_PATH); git log --format="%H" -n 1 || (echo git hash not available; exit 0)` - -ASMDI_VERSION_INTERMEDIATE = $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),,COMMON)/$(LOCAL_MODULE).version.txt -$(ASMDI_VERSION_INTERMEDIATE): - $(hide) mkdir -p $(dir $@) - $(hide) echo "git.version=$(ASMDI_GIT_VERSION_TAG)" > $@ - -LOCAL_JAVA_RESOURCE_FILES := $(ASMDI_VERSION_INTERMEDIATE) - - -include $(BUILD_STATIC_JAVA_LIBRARY) -- cgit v1.2.3