dist_jar / dist_aar with direct_deps_only should not contain R.class files of transitive deps |
||
Issue description
E.g.:
dist_jar("test_dist_jar") {
output = "${root_out_dir}/lib.java/test.jar"
direct_deps_only = true
use_unprocessed_jars = true
requires_android = true
deps = [
"//ui/android:ui_utils_java",
]
}
The resulting test.jar will have R.class files from support library.
,
Apr 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48b395f6dd3891b98a309066fe30b1687266df6f commit 48b395f6dd3891b98a309066fe30b1687266df6f Author: Andrew Grieve <agrieve@chromium.org> Date: Mon Apr 23 11:05:01 2018 Android: Compile only "owned" R.java srcjars in java targets The ownership model here isn't perfect due to prebuilts sometime not bundling their R.class files. You can also have multiple java_libraries depend on the same android_resources(), in which case they would both "own" it. Shared ownership doesn't actually cause any problems though. This fixes a bug where dist_jar() / dist_aar() with direct_deps_only=true would have all transitive R.class files packaged in them. This should also speed builds marginally due to fewer R.java compiles. TBR=digit # lgtm'ed Bug: 834979 Change-Id: I3e2bde2f7619c51a3aa894d66bfbf443418b9a37 Reviewed-on: https://chromium-review.googlesource.com/1020289 Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#552668} [modify] https://crrev.com/48b395f6dd3891b98a309066fe30b1687266df6f/build/android/gradle/generate_gradle.py [modify] https://crrev.com/48b395f6dd3891b98a309066fe30b1687266df6f/build/android/gyp/write_build_config.py [modify] https://crrev.com/48b395f6dd3891b98a309066fe30b1687266df6f/build/config/android/internal_rules.gni
,
Apr 23 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by agrieve@chromium.org
, Apr 19 2018