summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-02-22 19:29:29 -0800
committerAdam Lesinski <adamlesinski@google.com>2017-02-22 19:54:43 -0800
commitb5dc4bd49a036e3403ca17e961d2c8e13e038295 (patch)
treee07c0d9a9718a34e2834fe6adbfd99e449cebb8b /tools/aapt2/java/JavaClassGenerator.h
parent9a53d03104c4535f512ec24e63afe9a965979812 (diff)
AAPT2: Few tweaks to get shared-libraries working
Test: manual (building shared support library demo) Change-Id: I4730645aa92ba1893baf67ffe35fbd4aac0f8e46
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.h')
-rw-r--r--tools/aapt2/java/JavaClassGenerator.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/aapt2/java/JavaClassGenerator.h b/tools/aapt2/java/JavaClassGenerator.h
index 178f558ac2ec..45104301e7f5 100644
--- a/tools/aapt2/java/JavaClassGenerator.h
+++ b/tools/aapt2/java/JavaClassGenerator.h
@@ -33,13 +33,19 @@ class AnnotationProcessor;
class ClassDefinition;
class MethodDefinition;
+// Options for generating onResourcesLoaded callback in R.java.
+struct OnResourcesLoadedCallbackOptions {
+ // Other R classes to delegate the same callback to (with the same package ID).
+ std::vector<std::string> packages_to_callback;
+};
+
struct JavaClassGeneratorOptions {
// Specifies whether to use the 'final' modifier on resource entries. Default is true.
bool use_final = true;
- // Whether to generate code to rewrite the package ID of resources.
- // Implies use_final == true. Default is false.
- bool generate_rewrite_callback = false;
+ // If set, generates code to rewrite the package ID of resources.
+ // Implies use_final == true. Default is unset.
+ Maybe<OnResourcesLoadedCallbackOptions> rewrite_callback_options;
enum class SymbolTypes {
kAll,