summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-08-09 01:48:35 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-09 00:40:15 +0000
commitec64709ce042bcf456f9749e079e5f6981cfbbb9 (patch)
tree9ac12058f26bbf10fb5c2909de4149a3d25b77fc /tests
parentc1bf40f5c46e5c7597d5cd3f80d8eda83773683e (diff)
parent833f3ccbc8f4dd1ec8abb9121988b99ff34ec4c1 (diff)
downloadframeworks_base-ec64709ce042bcf456f9749e079e5f6981cfbbb9.zip
frameworks_base-ec64709ce042bcf456f9749e079e5f6981cfbbb9.tar.gz
frameworks_base-ec64709ce042bcf456f9749e079e5f6981cfbbb9.tar.bz2
Merge "AAPT support for feature splits" into lmp-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/FeatureSplit/base/Android.mk25
-rw-r--r--tests/FeatureSplit/base/AndroidManifest.xml22
-rw-r--r--tests/FeatureSplit/base/res/values/values.xml24
-rw-r--r--tests/FeatureSplit/feature1/Android.mk32
-rw-r--r--tests/FeatureSplit/feature1/AndroidManifest.xml21
-rw-r--r--tests/FeatureSplit/feature1/res/values/values.xml25
-rw-r--r--tests/FeatureSplit/feature2/Android.mk35
-rw-r--r--tests/FeatureSplit/feature2/AndroidManifest.xml21
-rw-r--r--tests/FeatureSplit/feature2/res/values/values.xml24
9 files changed, 229 insertions, 0 deletions
diff --git a/tests/FeatureSplit/base/Android.mk b/tests/FeatureSplit/base/Android.mk
new file mode 100644
index 0000000..7c0fc04
--- /dev/null
+++ b/tests/FeatureSplit/base/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_PACKAGE_NAME := FeatureSplitBase
+
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_PACKAGE)
diff --git a/tests/FeatureSplit/base/AndroidManifest.xml b/tests/FeatureSplit/base/AndroidManifest.xml
new file mode 100644
index 0000000..989e802
--- /dev/null
+++ b/tests/FeatureSplit/base/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.split.feature">
+ <application android:label="@string/app_title"
+ android:hasCode="false">
+ </application>
+</manifest>
diff --git a/tests/FeatureSplit/base/res/values/values.xml b/tests/FeatureSplit/base/res/values/values.xml
new file mode 100644
index 0000000..564d301
--- /dev/null
+++ b/tests/FeatureSplit/base/res/values/values.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+ <string name="app_title">FeatureSplit APK</string>
+
+ <item type="id" name="test_id"/>
+ <integer name="test_integer">100</integer>
+ <color name="test_color">#ff0000</color>
+</resources>
+
diff --git a/tests/FeatureSplit/feature1/Android.mk b/tests/FeatureSplit/feature1/Android.mk
new file mode 100644
index 0000000..3059824
--- /dev/null
+++ b/tests/FeatureSplit/feature1/Android.mk
@@ -0,0 +1,32 @@
+#
+# 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_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_PACKAGE_NAME := FeatureSplit1
+LOCAL_MODULE_TAGS := tests
+
+featureOf := FeatureSplitBase
+featureOfApk := $(call intermediates-dir-for,APPS,$(featureOf))/package.apk
+localRStamp := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON)/src/R.stamp
+$(localRStamp): $(featureOfApk)
+
+$(info $(localRStamp))
+LOCAL_AAPT_FLAGS := --feature-of $(featureOfApk)
+
+include $(BUILD_PACKAGE)
diff --git a/tests/FeatureSplit/feature1/AndroidManifest.xml b/tests/FeatureSplit/feature1/AndroidManifest.xml
new file mode 100644
index 0000000..2aadc6d
--- /dev/null
+++ b/tests/FeatureSplit/feature1/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.split.feature"
+ featureName="feature1">
+ <application android:hasCode="false" />
+</manifest>
diff --git a/tests/FeatureSplit/feature1/res/values/values.xml b/tests/FeatureSplit/feature1/res/values/values.xml
new file mode 100644
index 0000000..70eb56a
--- /dev/null
+++ b/tests/FeatureSplit/feature1/res/values/values.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+ <item type="id" name="test_id2"/>
+ <integer name="test_integer2">200</integer>
+ <color name="test_color2">#00ff00</color>
+ <string-array name="string_array2">
+ <item>@*string/app_title</item>
+ </string-array>
+</resources>
+
diff --git a/tests/FeatureSplit/feature2/Android.mk b/tests/FeatureSplit/feature2/Android.mk
new file mode 100644
index 0000000..e69cbe8
--- /dev/null
+++ b/tests/FeatureSplit/feature2/Android.mk
@@ -0,0 +1,35 @@
+#
+# 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_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_PACKAGE_NAME := FeatureSplit2
+LOCAL_MODULE_TAGS := tests
+
+featureOf := FeatureSplitBase
+featureAfter := FeatureSplit1
+
+featureOfApk := $(call intermediates-dir-for,APPS,$(featureOf))/package.apk
+featureAfterApk := $(call intermediates-dir-for,APPS,$(featureAfter))/package.apk
+localRStamp := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON)/src/R.stamp
+$(localRStamp): $(featureOfApk) $(featureAfterApk)
+
+LOCAL_AAPT_FLAGS := --feature-of $(featureOfApk)
+LOCAL_AAPT_FLAGS += --feature-after $(featureAfterApk)
+
+include $(BUILD_PACKAGE)
diff --git a/tests/FeatureSplit/feature2/AndroidManifest.xml b/tests/FeatureSplit/feature2/AndroidManifest.xml
new file mode 100644
index 0000000..d139900
--- /dev/null
+++ b/tests/FeatureSplit/feature2/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.split.feature"
+ featureName="feature2">
+ <application android:hasCode="false"/>
+</manifest>
diff --git a/tests/FeatureSplit/feature2/res/values/values.xml b/tests/FeatureSplit/feature2/res/values/values.xml
new file mode 100644
index 0000000..af5ed1b
--- /dev/null
+++ b/tests/FeatureSplit/feature2/res/values/values.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+ <integer name="test_integer3">300</integer>
+ <color name="test_color3">#0000ff</color>
+ <string-array name="string_array3">
+ <item>@string/app_title</item>
+ </string-array>
+</resources>
+