Convert MultiDexLegacy* tests to Android.bp and d8 --main-dex-rules
The mainDexClasses script is obsolete, pass the rule to d8 with --main-dex-rules instead. Test: mma Change-Id: Ia88660550c3e57749b8ccb154e97c31aaf2fcf3a
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
// The application with a minimal main dex
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyAndException",
|
||||
|
||||
static_libs: [
|
||||
"android-support-multidex",
|
||||
"android-support-multidex-instrumentation",
|
||||
"androidx.test.rules",
|
||||
],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
javacflags: ["-nowarn"],
|
||||
|
||||
main_dex_rules: [":mainDexClassesRules"],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
min_sdk_version: "16",
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
# Copyright (C) 2014 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 application with a minimal main dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex android-support-multidex-instrumentation androidx.test.rules
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 8
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyAndException
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_JAVACFLAGS := -nowarn
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/multidexlegacyandexception/Test.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
@@ -0,0 +1,70 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
// The application with a minimal main dex
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyTestApp",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
main_dex_rules: [
|
||||
":mainDexClassesRules",
|
||||
"mainDexClasses.rules",
|
||||
],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
min_sdk_version: "16",
|
||||
}
|
||||
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyTestApp2",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
main_dex_rules: [
|
||||
":mainDexClassesRules",
|
||||
"mainDexClasses.rules",
|
||||
],
|
||||
dxflags: [
|
||||
// --release disables the old --minimal-main-dex behavior
|
||||
"--release",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
min_sdk_version: "16",
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
# Copyright (C) 2014 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 application with a minimal main dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 8
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/multidexlegacytestapp/Test.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
|
||||
## The application with a full main dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 8
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp2
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
mainDexList2:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList2)
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList2): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/multidexlegacytestapp/Test.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList2)
|
||||
@@ -0,0 +1 @@
|
||||
-keep class com.android.multidexlegacytestapp.Test
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
// The application with a minimal main dex
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestAppTests",
|
||||
|
||||
static_libs: ["android-support-multidex-instrumentation"],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
javacflags: ["-nowarn"],
|
||||
|
||||
min_sdk_version: "16",
|
||||
|
||||
instrumentation_for: "MultiDexLegacyTestApp",
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
# Copyright (C) 2014 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 application with a minimal main dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex-instrumentation
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 8
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_JAVACFLAGS := -nowarn
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
LOCAL_INSTRUMENTATION_FOR := MultiDexLegacyTestApp
|
||||
|
||||
LOCAL_JACK_FLAGS := -D jack.dex.output.policy=minimal-multidex -D jack.dex.output.multidex.legacy=true
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
// The tests with only one dex
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestAppTests2",
|
||||
|
||||
static_libs: [
|
||||
"android-support-multidex-instrumentation",
|
||||
"androidx.test.rules",
|
||||
],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
javacflags: ["-nowarn"],
|
||||
|
||||
min_sdk_version: "16",
|
||||
|
||||
instrumentation_for: "MultiDexLegacyTestApp",
|
||||
}
|
||||
|
||||
// The tests with a minimal main dex
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestAppTests2-multidex",
|
||||
|
||||
static_libs: [
|
||||
"android-support-multidex-instrumentation",
|
||||
"androidx.test.rules",
|
||||
],
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
javacflags: ["-nowarn"],
|
||||
|
||||
min_sdk_version: "16",
|
||||
|
||||
instrumentation_for: "MultiDexLegacyTestApp",
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
# Copyright (C) 2014 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 tests with only one dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex-instrumentation androidx.test.rules
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := current
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests2
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_JAVACFLAGS := -nowarn
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
LOCAL_INSTRUMENTATION_FOR := MultiDexLegacyTestApp
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
|
||||
## The tests with a minimal main dex
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex-instrumentation androidx.test.rules
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 8
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests2-multidex
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_JAVACFLAGS := -nowarn
|
||||
|
||||
LOCAL_MIN_SDK_VERSION := 8
|
||||
|
||||
LOCAL_INSTRUMENTATION_FOR := MultiDexLegacyTestApp
|
||||
|
||||
LOCAL_JACK_FLAGS := -D jack.dex.output.policy=minimal-multidex -D jack.dex.output.multidex.legacy=true
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyTestApp_without_corrupted",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
}
|
||||
|
||||
java_genrule {
|
||||
name: "MultiDexLegacyTestApp_genrule",
|
||||
srcs: [
|
||||
":MultiDexLegacyTestApp_without_corrupted",
|
||||
],
|
||||
tools: [
|
||||
"soong_zip",
|
||||
"merge_zips",
|
||||
],
|
||||
out: ["MultiDexLegacyTestApp_with_corrupted.apk"],
|
||||
cmd: "touch $(genDir)/classes2.dex &&" +
|
||||
" $(location soong_zip) -o $(genDir)/corrupted.zip -j -f $(genDir)/classes2.dex &&" +
|
||||
" $(location merge_zips) $(out) $(location :MultiDexLegacyTestApp_without_corrupted) $(genDir)/corrupted.zip",
|
||||
}
|
||||
|
||||
android_test_import {
|
||||
name: "MultiDexLegacyTestApp_corrupted",
|
||||
apk: ":MultiDexLegacyTestApp_genrule",
|
||||
default_dev_cert: true,
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 18
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp_corrupted
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
corrupted_classes2_dex := $(dir $(built_dex))/classes2.dex
|
||||
|
||||
$(corrupted_classes2_dex): $(built_dex)
|
||||
$(hide) touch $@
|
||||
|
||||
$(LOCAL_BUILT_MODULE): $(corrupted_classes2_dex)
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestServices",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
main_dex_rules: [":mainDexClassesRules"],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 9
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestServices
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
@@ -24,7 +24,7 @@ package {
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestServicesTests",
|
||||
srcs: ["src/**/*.java"],
|
||||
sdk_version: "9",
|
||||
sdk_version: "16",
|
||||
dex_preopt: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test {
|
||||
name: "MultiDexLegacyTestServicesTests2",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
libs: ["android-support-multidex"],
|
||||
static_libs: ["androidx.test.rules"],
|
||||
|
||||
sdk_version: "16",
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyTestServicesTests2
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := android-support-multidex
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
|
||||
|
||||
LOCAL_SDK_VERSION := 9
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyVersionedTestApp_v1",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
main_dex_rules: [
|
||||
":mainDexClassesRules",
|
||||
"mainDexClasses.rules",
|
||||
],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 9
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v1
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/framework/multidexlegacyversionedtestapp/MultiDexUpdateTest.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
@@ -0,0 +1 @@
|
||||
-keep class com.android.framework.multidexlegacyversionedtestapp.MultiDexUpdateTest
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyVersionedTestApp_v2",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
main_dex_rules: [
|
||||
":mainDexClassesRules",
|
||||
"mainDexClasses.rules",
|
||||
],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 9
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v2
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/framework/multidexlegacyversionedtestapp/MultiDexUpdateTest.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
@@ -0,0 +1 @@
|
||||
-keep class com.android.framework.multidexlegacyversionedtestapp.MultiDexUpdateTest
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2014 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
android_test_helper_app {
|
||||
name: "MultiDexLegacyVersionedTestApp_v3",
|
||||
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
sdk_version: "16",
|
||||
|
||||
static_libs: ["android-support-multidex"],
|
||||
|
||||
main_dex_rules: [
|
||||
":mainDexClassesRules",
|
||||
"mainDexClasses.rules",
|
||||
],
|
||||
dxflags: [
|
||||
// --debug triggers the old --minimal-main-dex behavior
|
||||
"--debug",
|
||||
],
|
||||
optimize: {
|
||||
// disable optimization to force D8 instead of R8, as R8 doesn't support
|
||||
// --main-dex-rules.
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Copyright (C) 2014 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_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||
|
||||
LOCAL_SDK_VERSION := 9
|
||||
|
||||
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v3
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
|
||||
|
||||
mainDexList:= \
|
||||
$(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),$(LOCAL_IS_HOST_MODULE),common)/maindex.list
|
||||
|
||||
LOCAL_DEX_PREOPT := false
|
||||
|
||||
LOCAL_EMMA_INSTRUMENT := false
|
||||
|
||||
LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(mainDexList) --minimal-main-dex
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
$(mainDexList): $(full_classes_pre_proguard_jar) $(MAINDEXCLASSES) $(PROGUARD_DEPS)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
PROGUARD_HOME=$(PROGUARD_HOME) $(MAINDEXCLASSES) $< 1>$@
|
||||
echo "com/android/framework/multidexlegacyversionedtestapp/MultiDexUpdateTest.class" >> $@
|
||||
|
||||
$(built_dex_intermediate): $(mainDexList)
|
||||
@@ -0,0 +1 @@
|
||||
-keep class com.android.framework.multidexlegacyversionedtestapp.MultiDexUpdateTest
|
||||
Reference in New Issue
Block a user