summaryrefslogtreecommitdiff
path: root/tools/aapt2/integration-tests
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-08-15 21:32:49 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-08-23 11:30:54 -0700
commit1ef0fa9d7242b1926543bc49e35905d1be02a781 (patch)
tree1e0d7a900b8e595dcb38b41e8f6cd8e7690cd747 /tools/aapt2/integration-tests
parent668feb252a226f39acbad801bf8e256a04cb3e1f (diff)
AAPT2: Fixup namespace implementation
A few pieces were missing in the namespace mangling implementation. Namespace aware libraries now work, along with R class generation. Bug: 64706588 Test: make AaptTestNamespace_App Change-Id: I12f78d6aa909e782c0faf7ceaa36058f2e6c864a
Diffstat (limited to 'tools/aapt2/integration-tests')
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/Android.mk2
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/App/Android.mk29
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/App/AndroidManifest.xml30
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/App/res/layout/activity_main.xml29
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/App/res/values/values.xml29
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/App/src/com/android/aapt/namespace/app/MainActivity.java34
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk28
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibOne/AndroidManifest.xml21
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibOne/res/values/values.xml28
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk29
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibTwo/AndroidManifest.xml21
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibTwo/res/values/values.xml27
-rw-r--r--tools/aapt2/integration-tests/NamespaceTest/LibTwo/src/com/android/aapt/namespace/libtwo/TextView.java53
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/Android.mk2
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/Android.mk (renamed from tools/aapt2/integration-tests/AppOne/Android.mk)6
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/AndroidManifest.xml (renamed from tools/aapt2/integration-tests/AppOne/AndroidManifest.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/assets/subdir/subsubdir/test.txt (renamed from tools/aapt2/integration-tests/AppOne/assets/subdir/subsubdir/test.txt)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/assets/test.txt (renamed from tools/aapt2/integration-tests/AppOne/assets/test.txt)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/assets2/new.txt (renamed from tools/aapt2/integration-tests/AppOne/assets2/new.txt)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/assets2/test.txt (renamed from tools/aapt2/integration-tests/AppOne/assets2/test.txt)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/cheap_transparency.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/cheap_transparency.png)bin397 -> 397 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/complex.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/complex.9.png)bin409 -> 409 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/icon.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/icon.png)bin2341 -> 2341 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/image.xml (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/image.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/outline_8x8.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/outline_8x8.9.png)bin191 -> 191 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_off_center_outline_32x16.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_off_center_outline_32x16.9.png)bin196 -> 196 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_outline_32x16.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_outline_32x16.9.png)bin181 -> 181 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/test.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/test.9.png)bin124 -> 124 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_3x3.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/transparent_3x3.9.png)bin105 -> 105 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_optical_bounds_3x3.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/transparent_optical_bounds_3x3.9.png)bin103 -> 103 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_3x3.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/white_3x3.9.png)bin103 -> 103 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_optical_bounds_3x3.9.png (renamed from tools/aapt2/integration-tests/AppOne/res/drawable/white_optical_bounds_3x3.9.png)bin105 -> 105 bytes
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-italic.ttf (renamed from tools/aapt2/integration-tests/AppOne/res/font/myfont-italic.ttf)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-normal.ttf (renamed from tools/aapt2/integration-tests/AppOne/res/font/myfont-normal.ttf)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont.xml (renamed from tools/aapt2/integration-tests/AppOne/res/font/myfont.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/layout-v21/main.xml (renamed from tools/aapt2/integration-tests/AppOne/res/layout-v21/main.xml)1
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/layout/main.xml (renamed from tools/aapt2/integration-tests/AppOne/res/layout/main.xml)1
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/layout/special.xml (renamed from tools/aapt2/integration-tests/AppOne/res/layout/special.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/navigation/home.xml (renamed from tools/aapt2/integration-tests/AppOne/res/navigation/home.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/raw/test.txt (renamed from tools/aapt2/integration-tests/AppOne/res/raw/test.txt)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/transition/transition_set.xml (renamed from tools/aapt2/integration-tests/AppOne/res/transition/transition_set.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/values-v4/styles.xml (renamed from tools/aapt2/integration-tests/AppOne/res/values-v4/styles.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/values/colors.xml (renamed from tools/aapt2/integration-tests/AppOne/res/values/colors.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/values/styles.xml (renamed from tools/aapt2/integration-tests/AppOne/res/values/styles.xml)2
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/res/values/test.xml (renamed from tools/aapt2/integration-tests/AppOne/res/values/test.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/App/src/com/android/aapt/app/one/AppOne.java (renamed from tools/aapt2/integration-tests/AppOne/src/com/android/aapt/app/one/AppOne.java)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk (renamed from tools/aapt2/integration-tests/StaticLibOne/Android.mk)4
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibOne/AndroidManifest.xml (renamed from tools/aapt2/integration-tests/StaticLibOne/AndroidManifest.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibOne/res/layout/layout.xml (renamed from tools/aapt2/integration-tests/StaticLibOne/res/layout/layout.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibOne/res/values/values.xml (renamed from tools/aapt2/integration-tests/StaticLibOne/res/values/values.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java (renamed from tools/aapt2/integration-tests/StaticLibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk (renamed from tools/aapt2/integration-tests/StaticLibTwo/Android.mk)4
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/AndroidManifest.xml (renamed from tools/aapt2/integration-tests/StaticLibTwo/AndroidManifest.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/drawable/vector.xml (renamed from tools/aapt2/integration-tests/StaticLibTwo/res/drawable/vector.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/layout/layout_two.xml (renamed from tools/aapt2/integration-tests/StaticLibTwo/res/layout/layout_two.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/values/values.xml (renamed from tools/aapt2/integration-tests/StaticLibTwo/res/values/values.xml)0
-rw-r--r--tools/aapt2/integration-tests/StaticLibTest/LibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java (renamed from tools/aapt2/integration-tests/StaticLibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java)0
57 files changed, 370 insertions, 10 deletions
diff --git a/tools/aapt2/integration-tests/NamespaceTest/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/Android.mk
new file mode 100644
index 000000000000..6361f9b8ae7d
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/Android.mk
@@ -0,0 +1,2 @@
+LOCAL_PATH := $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
new file mode 100644
index 000000000000..6ed07b0c5c73
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2017 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_USE_AAPT2 := true
+LOCAL_AAPT_NAMESPACES := true
+LOCAL_PACKAGE_NAME := AaptTestNamespace_App
+LOCAL_MODULE_TAGS := tests
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ AaptTestNamespace_LibOne \
+ AaptTestNamespace_LibTwo
+LOCAL_AAPT_FLAGS := -v
+include $(BUILD_PACKAGE)
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/AndroidManifest.xml b/tools/aapt2/integration-tests/NamespaceTest/App/AndroidManifest.xml
new file mode 100644
index 000000000000..6398a83ea1d2
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.aapt.namespace.app">
+
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
+
+ <application android:theme="@style/AppTheme" android:label="@string/app_name">
+ <activity android:name=".MainActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/res/layout/activity_main.xml b/tools/aapt2/integration-tests/NamespaceTest/App/res/layout/activity_main.xml
new file mode 100644
index 000000000000..19bfd942a5bd
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/res/layout/activity_main.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:libone="http://schemas.android.com/apk/res/com.android.aapt.namespace.libone"
+ xmlns:libtwo="http://schemas.android.com/apk/res/com.android.aapt.namespace.libtwo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <com.android.aapt.namespace.libtwo.TextView
+ android:id="@+id/textview"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="@bool/always_true"
+ android:text="@libone:string/textview_text"
+ libtwo:textview_attr="?libone:theme_attr" />
+</RelativeLayout> \ No newline at end of file
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/res/values/values.xml b/tools/aapt2/integration-tests/NamespaceTest/App/res/values/values.xml
new file mode 100644
index 000000000000..1b80d9542881
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/res/values/values.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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_name">Namespace App</string>
+ <bool name="always_true">true</bool>
+
+ <style name="AppTheme" parent="com.android.aapt.namespace.libone:style/Theme">
+ <item name="android:colorPrimary">#3F51B5</item>
+ <item name="android:colorPrimaryDark">#303F9F</item>
+ <item name="android:colorAccent">#FF4081</item>
+ <item name="com.android.aapt.namespace.libone:theme_attr">
+ @com.android.aapt.namespace.libtwo:string/public_string
+ </item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/src/com/android/aapt/namespace/app/MainActivity.java b/tools/aapt2/integration-tests/NamespaceTest/App/src/com/android/aapt/namespace/app/MainActivity.java
new file mode 100644
index 000000000000..fcb4c3c12f81
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/src/com/android/aapt/namespace/app/MainActivity.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2017 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 com.android.aapt.namespace.app;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.Toast;
+
+public class MainActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ com.android.aapt.namespace.libtwo.TextView tv = findViewById(R.id.textview);
+
+
+
+ Toast.makeText(this, tv.getTextViewAttr(), Toast.LENGTH_LONG).show();
+ }
+}
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
new file mode 100644
index 000000000000..b1cac68dae7a
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2017 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_USE_AAPT2 := true
+LOCAL_AAPT_NAMESPACES := true
+LOCAL_MODULE := AaptTestNamespace_LibOne
+LOCAL_MODULE_TAGS := tests
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+# We need this to retain the R.java generated for this library.
+LOCAL_JAR_EXCLUDE_FILES := none
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibOne/AndroidManifest.xml b/tools/aapt2/integration-tests/NamespaceTest/LibOne/AndroidManifest.xml
new file mode 100644
index 000000000000..70b4b226624b
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibOne/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.aapt.namespace.libone">
+
+ <uses-sdk android:minSdkVersion="21" />
+</manifest>
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibOne/res/values/values.xml b/tools/aapt2/integration-tests/NamespaceTest/LibOne/res/values/values.xml
new file mode 100644
index 000000000000..d2dcea0c0b1e
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibOne/res/values/values.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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>
+ <public type="string" name="textview_text" />
+ <string name="textview_text">LibOne\'s textview_text string!</string>
+
+ <public type="attr" name="theme_attr" />
+ <attr name="theme_attr" format="string" />
+
+ <public type="style" name="Theme" />
+ <style name="Theme" parent="android:Theme.Material.Light.DarkActionBar">
+ <item name="theme_attr">[Please override with your own value]</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
new file mode 100644
index 000000000000..dc16d1bbb420
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2017 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_USE_AAPT2 := true
+LOCAL_AAPT_NAMESPACES := true
+LOCAL_MODULE := AaptTestNamespace_LibTwo
+LOCAL_MODULE_TAGS := tests
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+# We need this to retain the R.java generated for this library.
+LOCAL_JAR_EXCLUDE_FILES := none
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibTwo/AndroidManifest.xml b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/AndroidManifest.xml
new file mode 100644
index 000000000000..32944a9b8f0b
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.aapt.namespace.libtwo">
+
+ <uses-sdk android:minSdkVersion="21" />
+</manifest>
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibTwo/res/values/values.xml b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/res/values/values.xml
new file mode 100644
index 000000000000..0c5f5d8d55e0
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/res/values/values.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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>
+ <public type="string" name="public_string" />
+ <string name="public_string">LibTwo\'s public string!</string>
+
+ <public type="attr" name="textview_attr" />
+ <attr name="textview_attr" format="string" />
+
+ <declare-styleable name="TextView">
+ <attr name="textview_attr" />
+ </declare-styleable>
+</resources> \ No newline at end of file
diff --git a/tools/aapt2/integration-tests/NamespaceTest/LibTwo/src/com/android/aapt/namespace/libtwo/TextView.java b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/src/com/android/aapt/namespace/libtwo/TextView.java
new file mode 100644
index 000000000000..0f8024e58797
--- /dev/null
+++ b/tools/aapt2/integration-tests/NamespaceTest/LibTwo/src/com/android/aapt/namespace/libtwo/TextView.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2017 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 com.android.aapt.namespace.libtwo;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+
+public class TextView extends android.widget.TextView {
+
+ private String mTextViewAttr;
+
+ public TextView(Context context) {
+ this(context, null);
+ }
+
+ public TextView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public TextView(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public TextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+
+ final TypedArray ta = context.getTheme().obtainStyledAttributes(attrs, R.styleable.TextView,
+ 0, 0);
+ try {
+ mTextViewAttr = ta.getString(R.styleable.TextView_textview_attr);
+ } finally {
+ ta.recycle();
+ }
+ }
+
+ public String getTextViewAttr() {
+ return mTextViewAttr;
+ }
+}
diff --git a/tools/aapt2/integration-tests/StaticLibTest/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/Android.mk
new file mode 100644
index 000000000000..6361f9b8ae7d
--- /dev/null
+++ b/tools/aapt2/integration-tests/StaticLibTest/Android.mk
@@ -0,0 +1,2 @@
+LOCAL_PATH := $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tools/aapt2/integration-tests/AppOne/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/App/Android.mk
index 38bd5b5e3275..4d0c01d565a5 100644
--- a/tools/aapt2/integration-tests/AppOne/Android.mk
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/Android.mk
@@ -18,12 +18,12 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
-LOCAL_PACKAGE_NAME := AaptTestAppOne
+LOCAL_PACKAGE_NAME := AaptTestStaticLib_App
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets $(LOCAL_PATH)/assets2
LOCAL_STATIC_ANDROID_LIBRARIES := \
- AaptTestStaticLibOne \
- AaptTestStaticLibTwo
+ AaptTestStaticLib_LibOne \
+ AaptTestStaticLib_LibTwo
LOCAL_AAPT_FLAGS := --no-version-vectors --no-version-transitions
include $(BUILD_PACKAGE)
diff --git a/tools/aapt2/integration-tests/AppOne/AndroidManifest.xml b/tools/aapt2/integration-tests/StaticLibTest/App/AndroidManifest.xml
index a5f202dd22fc..a5f202dd22fc 100644
--- a/tools/aapt2/integration-tests/AppOne/AndroidManifest.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/AndroidManifest.xml
diff --git a/tools/aapt2/integration-tests/AppOne/assets/subdir/subsubdir/test.txt b/tools/aapt2/integration-tests/StaticLibTest/App/assets/subdir/subsubdir/test.txt
index 125194943ec8..125194943ec8 100644
--- a/tools/aapt2/integration-tests/AppOne/assets/subdir/subsubdir/test.txt
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/assets/subdir/subsubdir/test.txt
diff --git a/tools/aapt2/integration-tests/AppOne/assets/test.txt b/tools/aapt2/integration-tests/StaticLibTest/App/assets/test.txt
index 88266de2b4d4..88266de2b4d4 100644
--- a/tools/aapt2/integration-tests/AppOne/assets/test.txt
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/assets/test.txt
diff --git a/tools/aapt2/integration-tests/AppOne/assets2/new.txt b/tools/aapt2/integration-tests/StaticLibTest/App/assets2/new.txt
index f4963a95503a..f4963a95503a 100644
--- a/tools/aapt2/integration-tests/AppOne/assets2/new.txt
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/assets2/new.txt
diff --git a/tools/aapt2/integration-tests/AppOne/assets2/test.txt b/tools/aapt2/integration-tests/StaticLibTest/App/assets2/test.txt
index 5d8b36c0d52d..5d8b36c0d52d 100644
--- a/tools/aapt2/integration-tests/AppOne/assets2/test.txt
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/assets2/test.txt
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/cheap_transparency.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/cheap_transparency.png
index 0522a9979db9..0522a9979db9 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/cheap_transparency.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/cheap_transparency.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/complex.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/complex.9.png
index baf9fff13ab5..baf9fff13ab5 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/complex.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/complex.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/icon.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/icon.png
index 4bff9b900643..4bff9b900643 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/icon.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/icon.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/image.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/image.xml
index 6132a75d85d0..6132a75d85d0 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/image.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/image.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/outline_8x8.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/outline_8x8.9.png
index 7b331e16fcbd..7b331e16fcbd 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/outline_8x8.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/outline_8x8.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_off_center_outline_32x16.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_off_center_outline_32x16.9.png
index 0ec6c70a2b9f..0ec6c70a2b9f 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_off_center_outline_32x16.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_off_center_outline_32x16.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_outline_32x16.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_outline_32x16.9.png
index e05708a089a3..e05708a089a3 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/round_rect_outline_32x16.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/round_rect_outline_32x16.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/test.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/test.9.png
index 33daa117ea9d..33daa117ea9d 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/test.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/test.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/transparent_3x3.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_3x3.9.png
index a11377a0d670..a11377a0d670 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/transparent_3x3.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_3x3.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/transparent_optical_bounds_3x3.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_optical_bounds_3x3.9.png
index 6803e4243484..6803e4243484 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/transparent_optical_bounds_3x3.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/transparent_optical_bounds_3x3.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/white_3x3.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_3x3.9.png
index 1a3731bbc8b8..1a3731bbc8b8 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/white_3x3.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_3x3.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/drawable/white_optical_bounds_3x3.9.png b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_optical_bounds_3x3.9.png
index 489ace292e1f..489ace292e1f 100644
--- a/tools/aapt2/integration-tests/AppOne/res/drawable/white_optical_bounds_3x3.9.png
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/drawable/white_optical_bounds_3x3.9.png
Binary files differ
diff --git a/tools/aapt2/integration-tests/AppOne/res/font/myfont-italic.ttf b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-italic.ttf
index e69de29bb2d1..e69de29bb2d1 100644
--- a/tools/aapt2/integration-tests/AppOne/res/font/myfont-italic.ttf
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-italic.ttf
diff --git a/tools/aapt2/integration-tests/AppOne/res/font/myfont-normal.ttf b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-normal.ttf
index e69de29bb2d1..e69de29bb2d1 100644
--- a/tools/aapt2/integration-tests/AppOne/res/font/myfont-normal.ttf
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont-normal.ttf
diff --git a/tools/aapt2/integration-tests/AppOne/res/font/myfont.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont.xml
index 1fb67914894e..1fb67914894e 100644
--- a/tools/aapt2/integration-tests/AppOne/res/font/myfont.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/font/myfont.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/layout-v21/main.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout-v21/main.xml
index 9f5a4a85cbcf..724bfe4a9536 100644
--- a/tools/aapt2/integration-tests/AppOne/res/layout-v21/main.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout-v21/main.xml
@@ -15,7 +15,6 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:support="http://schemas.android.com/apk/res/android.appcompat"
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
diff --git a/tools/aapt2/integration-tests/AppOne/res/layout/main.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout/main.xml
index ab1a251a7d56..aaa884bf7084 100644
--- a/tools/aapt2/integration-tests/AppOne/res/layout/main.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout/main.xml
@@ -15,7 +15,6 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:support="http://schemas.android.com/apk/res/android.appcompat"
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
diff --git a/tools/aapt2/integration-tests/AppOne/res/layout/special.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout/special.xml
index 28c85ca92019..28c85ca92019 100644
--- a/tools/aapt2/integration-tests/AppOne/res/layout/special.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/layout/special.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/navigation/home.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/navigation/home.xml
index ade271d60ab6..ade271d60ab6 100644
--- a/tools/aapt2/integration-tests/AppOne/res/navigation/home.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/navigation/home.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/raw/test.txt b/tools/aapt2/integration-tests/StaticLibTest/App/res/raw/test.txt
index b14df6442ea5..b14df6442ea5 100644
--- a/tools/aapt2/integration-tests/AppOne/res/raw/test.txt
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/raw/test.txt
diff --git a/tools/aapt2/integration-tests/AppOne/res/transition/transition_set.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/transition/transition_set.xml
index e10e6c2f53da..e10e6c2f53da 100644
--- a/tools/aapt2/integration-tests/AppOne/res/transition/transition_set.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/transition/transition_set.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/values-v4/styles.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/values-v4/styles.xml
index d8c11e210eda..d8c11e210eda 100644
--- a/tools/aapt2/integration-tests/AppOne/res/values-v4/styles.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/values-v4/styles.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/values/colors.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/colors.xml
index 4df5077051d2..4df5077051d2 100644
--- a/tools/aapt2/integration-tests/AppOne/res/values/colors.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/colors.xml
diff --git a/tools/aapt2/integration-tests/AppOne/res/values/styles.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/styles.xml
index 19d96c0809db..a088e5d0e1a2 100644
--- a/tools/aapt2/integration-tests/AppOne/res/values/styles.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/styles.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
-<resources xmlns:lib="http://schemas.android.com/apk/res/android.appcompat">
+<resources>
<style name="App">
<item name="android:background">@color/primary</item>
<item name="android:colorPrimary">@color/primary</item>
diff --git a/tools/aapt2/integration-tests/AppOne/res/values/test.xml b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/test.xml
index 2c9e8b877565..2c9e8b877565 100644
--- a/tools/aapt2/integration-tests/AppOne/res/values/test.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/res/values/test.xml
diff --git a/tools/aapt2/integration-tests/AppOne/src/com/android/aapt/app/one/AppOne.java b/tools/aapt2/integration-tests/StaticLibTest/App/src/com/android/aapt/app/one/AppOne.java
index 472b35a781fe..472b35a781fe 100644
--- a/tools/aapt2/integration-tests/AppOne/src/com/android/aapt/app/one/AppOne.java
+++ b/tools/aapt2/integration-tests/StaticLibTest/App/src/com/android/aapt/app/one/AppOne.java
diff --git a/tools/aapt2/integration-tests/StaticLibOne/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk
index 0b7129aa0d38..0c828b80b3b3 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/Android.mk
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.mk
@@ -18,11 +18,11 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
-LOCAL_MODULE := AaptTestStaticLibOne
+LOCAL_MODULE := AaptTestStaticLib_LibOne
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-# We need this to compile the Java sources of AaptTestStaticLibTwo using javac.
+# We need this to compile the Java sources of AaptTestStaticLib_LibTwo using javac.
LOCAL_JAR_EXCLUDE_FILES := none
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tools/aapt2/integration-tests/StaticLibOne/AndroidManifest.xml b/tools/aapt2/integration-tests/StaticLibTest/LibOne/AndroidManifest.xml
index 705047e71300..705047e71300 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/AndroidManifest.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/AndroidManifest.xml
diff --git a/tools/aapt2/integration-tests/StaticLibOne/res/layout/layout.xml b/tools/aapt2/integration-tests/StaticLibTest/LibOne/res/layout/layout.xml
index 683c91cd9cf5..683c91cd9cf5 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/res/layout/layout.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/res/layout/layout.xml
diff --git a/tools/aapt2/integration-tests/StaticLibOne/res/values/values.xml b/tools/aapt2/integration-tests/StaticLibTest/LibOne/res/values/values.xml
index b4dc90b3e640..b4dc90b3e640 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/res/values/values.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/res/values/values.xml
diff --git a/tools/aapt2/integration-tests/StaticLibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java b/tools/aapt2/integration-tests/StaticLibTest/LibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java
index cf48f67056cf..cf48f67056cf 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/Android.mk b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk
index 8b6eb41b08cd..538d5251b203 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/Android.mk
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.mk
@@ -18,10 +18,10 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
-LOCAL_MODULE := AaptTestStaticLibTwo
+LOCAL_MODULE := AaptTestStaticLib_LibTwo
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_SHARED_ANDROID_LIBRARIES := AaptTestStaticLibOne
+LOCAL_SHARED_ANDROID_LIBRARIES := AaptTestStaticLib_LibOne
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/AndroidManifest.xml b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/AndroidManifest.xml
index 28f069932452..28f069932452 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/AndroidManifest.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/AndroidManifest.xml
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/res/drawable/vector.xml b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/drawable/vector.xml
index dd5979f7e838..dd5979f7e838 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/res/drawable/vector.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/drawable/vector.xml
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/res/layout/layout_two.xml b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/layout/layout_two.xml
index ba9830708eb0..ba9830708eb0 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/res/layout/layout_two.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/layout/layout_two.xml
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/res/values/values.xml b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/values/values.xml
index 97bb2a53d9f6..97bb2a53d9f6 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/res/values/values.xml
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/res/values/values.xml
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java
index 7110dcdd017a..7110dcdd017a 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java
+++ b/tools/aapt2/integration-tests/StaticLibTest/LibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java