Fix generation of R class for libraries.
authorXavier Ducrohet <xav@android.com>
Thu, 31 Jan 2013 20:57:38 +0000 (12:57 -0800)
committerXavier Ducrohet <xav@android.com>
Thu, 31 Jan 2013 23:39:43 +0000 (15:39 -0800)
commit5fdd1fe8a46f5d87aced3c544ec966e2b038f757
tree7bf37a2fb217c8c0685815149700eeae74e35955
parenta3ef931a5a3a512b6ec96af46e72609b48f8fcfd
Fix generation of R class for libraries.

This adds support for libraries that shares the same package names
and libraries that use the app package name.

Also added two libraries to libsTest so that
lib2b shares the package name with lib2
libapp shares the package name with app.

Change-Id: I0c0fdb6fe553857e67227fad8d4f793d414de120
36 files changed:
builder/src/main/java/com/android/builder/AndroidBuilder.java
builder/src/main/java/com/android/builder/DefaultManifestParser.java
builder/src/main/java/com/android/builder/ManifestParser.java
builder/src/main/java/com/android/builder/internal/SymbolWriter.java
builder/src/test/java/com/android/builder/internal/SymbolWriterTest.java
gradle/src/main/groovy/com/android/build/gradle/LibraryPlugin.groovy
tests/libsTest/app/build.gradle
tests/libsTest/app/src/main/java/com/android/tests/libstest/app/MainActivity.java
tests/libsTest/app/src/main/res/layout/main.xml
tests/libsTest/app/src/test/java/com/android/tests/libstest/app/MainActivityTest.java
tests/libsTest/build.gradle
tests/libsTest/lib2b/build.gradle [new file with mode: 0644]
tests/libsTest/lib2b/proguard-project.txt [new file with mode: 0644]
tests/libsTest/lib2b/src/main/AndroidManifest.xml [new file with mode: 0644]
tests/libsTest/lib2b/src/main/java/com/android/tests/libstest/lib2/Lib2b.java [new file with mode: 0644]
tests/libsTest/lib2b/src/main/java/com/android/tests/libstest/lib2/MainActivity2b.java [new file with mode: 0644]
tests/libsTest/lib2b/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/lib2b/src/main/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/lib2b/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/lib2b/src/main/res/layout/lib2b_main.xml [new file with mode: 0644]
tests/libsTest/lib2b/src/main/res/values/strings.xml [new file with mode: 0644]
tests/libsTest/lib2b/src/main/resources/com/android/tests/libstest/lib2/Lib2b.txt [new file with mode: 0644]
tests/libsTest/lib2b/src/test/java/com/android/tests/libstest/lib2/MainActivity2bTest.java [new file with mode: 0644]
tests/libsTest/libapp/build.gradle [new file with mode: 0644]
tests/libsTest/libapp/proguard-project.txt [new file with mode: 0644]
tests/libsTest/libapp/src/main/AndroidManifest.xml [new file with mode: 0644]
tests/libsTest/libapp/src/main/java/com/android/tests/libstest/app/LibApp.java [new file with mode: 0644]
tests/libsTest/libapp/src/main/java/com/android/tests/libstest/app/MainActivityLibApp.java [new file with mode: 0644]
tests/libsTest/libapp/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/libapp/src/main/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/libapp/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
tests/libsTest/libapp/src/main/res/layout/libapp_main.xml [new file with mode: 0644]
tests/libsTest/libapp/src/main/res/values/strings.xml [new file with mode: 0644]
tests/libsTest/libapp/src/main/resources/com/android/tests/libstest/app/Libapp.txt [new file with mode: 0644]
tests/libsTest/libapp/src/test/java/com/android/tests/libstest/libapp/MainActivityLibAppTest.java [new file with mode: 0644]
tests/libsTest/settings.gradle