]> git.saurik.com Git - android/aapt.git/blobdiff - Command.cpp
Copy once-created R.java into library projects
[android/aapt.git] / Command.cpp
index 661ecb1d4395145eb06b8e013d4f1fec53f66fe6..c7dfb8fdf362069ad3bdf02ca56c023dd01f49b3 100644 (file)
@@ -904,10 +904,10 @@ int doDump(Bundle* bundle)
                                     error.string());
                                 goto bail;
                         }
-                    } else if (tag == "uses-gl-texture") {
+                    } else if (tag == "supports-gl-texture") {
                         String8 name = getAttribute(tree, NAME_ATTR, &error);
                         if (name != "" && error == "") {
-                            printf("uses-gl-texture:'%s'\n", name.string());
+                            printf("supports-gl-texture:'%s'\n", name.string());
                         } else {
                             fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n",
                                     error.string());
@@ -1414,6 +1414,17 @@ int doPackage(Bundle* bundle)
     if (assets->getPackage() == assets->getSymbolsPrivatePackage()) {
         if (bundle->getCustomPackage() == NULL) {
             err = writeResourceSymbols(bundle, assets, assets->getPackage(), true);
+            // Copy R.java for libraries
+            if (bundle->getExtraPackages() != NULL) {
+                // Split on semicolon
+                String8 libs(bundle->getExtraPackages());
+                char* packageString = strtok(libs.lockBuffer(libs.length()), ";");
+                while (packageString != NULL) {
+                    err = writeResourceSymbols(bundle, assets, String8(packageString), true);
+                    packageString = strtok(NULL, ";");
+                }
+                libs.unlockBuffer();
+            }
         } else {
             const String8 customPkg(bundle->getCustomPackage());
             err = writeResourceSymbols(bundle, assets, customPkg, true);