diff options
| author | 2020-05-13 17:08:18 +0000 | |
|---|---|---|
| committer | 2020-05-13 17:08:18 +0000 | |
| commit | 0941dd3d04b83a1a6e4b030584a585e1bcb2bfd6 (patch) | |
| tree | 58d888df67f17da362a41e90cb7aed02cc920c8f | |
| parent | 5d36f01873674a2c8a935fc6bde484f6cde82d4f (diff) | |
| parent | 9ed5638125d3eb323f5ef92ddc6fd9e588e01492 (diff) | |
Merge "Do not rename R.java package"
| -rw-r--r-- | tools/aapt2/cmd/Link.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp index 77e2a6bb21de..e8970d48e404 100644 --- a/tools/aapt2/cmd/Link.cpp +++ b/tools/aapt2/cmd/Link.cpp @@ -1669,6 +1669,16 @@ class Linker { context_->SetCompilationPackage(app_info.package); } + // Determine the package name under which to merge resources. + if (options_.rename_resources_package) { + if (!options_.custom_java_package) { + // Generate the R.java under the original package name instead of the package name specified + // through --rename-resources-package. + options_.custom_java_package = context_->GetCompilationPackage(); + } + context_->SetCompilationPackage(options_.rename_resources_package.value()); + } + // Now that the compilation package is set, load the dependencies. This will also extract // the Android framework's versionCode and versionName, if they exist. if (!LoadSymbolsFromIncludePaths()) { |