summaryrefslogtreecommitdiff
path: root/instrumentation
diff options
context:
space:
mode:
authorNan Zhang <nanzhang@google.com>2018-07-13 12:54:36 -0700
committerNan Zhang <nanzhang@google.com>2018-07-13 13:13:35 -0700
commit2121bfabfe5ca97740d8d3c836781d5d3a53ee8a (patch)
tree7767ac66ffe39e211278b85f3357827ca53c4106 /instrumentation
parent232a4df4d523e65bb8a7f431540e07ad63ef5618 (diff)
downloadmultidex-2121bfabfe5ca97740d8d3c836781d5d3a53ee8a.tar.gz
Convert android-support-multidex-(instrumentation) to Soong
Bug: b/70351683 Test: m -j offline-sdk-docs Change-Id: I59951b48511c55285a5123d2fc397f9a5a8b2d8b
Diffstat (limited to 'instrumentation')
-rw-r--r--instrumentation/Android.bp41
-rw-r--r--instrumentation/Android.mk34
2 files changed, 41 insertions, 34 deletions
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)