diff options
author | Nan Zhang <nanzhang@google.com> | 2018-07-23 12:06:00 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-07-23 12:06:00 -0700 |
commit | 711913cd2846a1826af853a13e0515269f813462 (patch) | |
tree | 1a478be7601a27d4d74cb42a776ed6568c727661 | |
parent | a4c2eaf8bc71dbcb3a28509cb62955acc15eb6b7 (diff) | |
parent | 2121bfabfe5ca97740d8d3c836781d5d3a53ee8a (diff) | |
download | multidex-711913cd2846a1826af853a13e0515269f813462.tar.gz |
Convert android-support-multidex-(instrumentation) to Soong
am: 2121bfabfe
Change-Id: I86adfaf656a3cc050b7ff688efe36ee95c998b28
-rw-r--r-- | instrumentation/Android.bp | 41 | ||||
-rw-r--r-- | instrumentation/Android.mk | 34 | ||||
-rw-r--r-- | library/Android.bp | 41 | ||||
-rw-r--r-- | library/Android.mk | 35 |
4 files changed, 82 insertions, 69 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) diff --git a/library/Android.bp b/library/Android.bp new file mode 100644 index 0000000..2f09070 --- /dev/null +++ b/library/Android.bp @@ -0,0 +1,41 @@ +// 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. + +genrule { + name: "android-support-multidex-version", + tools: [ + "soong_zip", + ], + // 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/library; git log --format=\"%H\" -n 1 || " + + "(echo git hash not available; exit 0)`\" > $(genDir)/android-support-multidex.version.txt", + out: [ + "android-support-multidex.version.txt", + ], +} + +java_library_static { + name: "android-support-multidex", + sdk_version: "4", + srcs: [ + "src/**/*.java", + ], + java_resources: [ + ":android-support-multidex-version", + ], +} diff --git a/library/Android.mk b/library/Android.mk deleted file mode 100644 index b38620e..0000000 --- a/library/Android.mk +++ /dev/null @@ -1,35 +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 -LOCAL_SDK_VERSION := 4 -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -ASMD_GIT_VERSION_TAG := `cd $(LOCAL_PATH); git log --format="%H" -n 1 || (echo git hash not available; exit 0)` - -ASMD_VERSION_INTERMEDIATE = $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),,COMMON)/$(LOCAL_MODULE).version.txt -$(ASMD_VERSION_INTERMEDIATE): - $(hide) mkdir -p $(dir $@) - $(hide) echo "git.version=$(ASMD_GIT_VERSION_TAG)" > $@ - -LOCAL_JAVA_RESOURCE_FILES := $(ASMD_VERSION_INTERMEDIATE) - -LOCAL_JACK_FLAGS:=--import-meta $(LOCAL_PATH)/jack-meta - -LOCAL_ADDITIONAL_DEPENDENCIES := $(wildcard $(LOCAL_PATH)/jack-meta/*) - -include $(BUILD_STATIC_JAVA_LIBRARY) |