Add staging-public-group to aapt2
staging-public-group is a tag for putting resources that have been added during platform development, but have not yet been finalized, into a separate resource id namespace. R.java fields of staged resources are non-final, so when the SDK is finalized, applications using the android R.java will automatically use the new finalized resource id without having to recompile. Staged resources can exist either in the same type id as the type's non-staged counterpart or in a separate type id. Multiple staging-public-group tags each with a different type id can exist simultaneously, which allows for multiple versions of the platform to be developed at once. Bug: 183411093 Test: aapt2_tests Change-Id: Ibb6c84c3626751e33c6097f35a03e306bb85616a
This commit is contained in:
@@ -460,7 +460,8 @@ void JavaClassGenerator::ProcessResource(const ResourceNameRef& name, const Reso
|
||||
|
||||
const std::string field_name = TransformToFieldName(name.entry);
|
||||
if (out_class_def != nullptr) {
|
||||
auto resource_member = util::make_unique<ResourceMember>(field_name, real_id);
|
||||
auto resource_member =
|
||||
util::make_unique<ResourceMember>(field_name, real_id, entry.visibility.staged_api);
|
||||
|
||||
// Build the comments and annotations for this entry.
|
||||
AnnotationProcessor* processor = resource_member->GetCommentBuilder();
|
||||
|
||||
Reference in New Issue
Block a user