|
|
Created:
3 years, 8 months ago by Peter Wen Modified:
3 years, 7 months ago CC:
chromium-reviews, mikecase+watch_chromium.org, nyquist+watch_chromium.org, jbudorick+watch_chromium.org, wnwen+watch_chromium.org, agrieve+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionAndroid: Remove apk modules for Android Studio
It is no longer necessary to list all the apk targets as separate
modules now that we have the _all pseudo module. Having the separate
modules resulted in bugs where Android Studio could not distinguish
between prod code and test code since some modules viewed dirs as prod
and some as test. The --split-projects flag can be used to see the
dependency graph, and when only a single module will be generated, the
_all pseudo module will not replace it.
For android studio's _all pseudo module, move all known test dirs to
androidTest instead of main so that they are properly displayed when
filtered.
BUG=620034
Review-Url: https://codereview.chromium.org/2837863002
Cr-Commit-Position: refs/heads/master@{#467704}
Committed: https://chromium.googlesource.com/chromium/src/+/e851ad470036997a9a43b0ee2710442f1b5c2096
Patch Set 1 #
Total comments: 2
Patch Set 2 : Remove other modules. #Patch Set 3 : Add exception for single target case #Patch Set 4 : Update docs. #
Messages
Total messages: 29 (17 generated)
wnwen@chromium.org changed reviewers: + estevenson@chromium.org
Hi Eric, This doesn't fix everything with scoping that Anita mentioned, but at least the files in the test directory are fixed. The rest of our *Test.java files that are in java/src would actually need to be moved. :/ Thanks, Peter
lgtm https://codereview.chromium.org/2837863002/diff/1/build/android/gradle/genera... File build/android/gradle/generate_gradle.py (right): https://codereview.chromium.org/2837863002/diff/1/build/android/gradle/genera... build/android/gradle/generate_gradle.py:561: def IsTestDir(path): nit: probably doesn't need to be a nested function since it doesn't use the outer context.
Description was changed from ========== Android: Move test directories to androidTest For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ========== to ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work but is not actively maintained. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ==========
Description was changed from ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work but is not actively maintained. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ========== to ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work but is not actively maintained. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ==========
Thanks Eric! @agrieve - Talked with Eric about removing *_apk modules and just leaving _all. This results in correct filtering by Android Studio. I think this simplification makes sense as there were huge overlaps between the different *_apk modules anyways. The --split-project flag can be used if granular gn targets are desired, but I think that's better done just by looking at gn files as there's still overlap. Eventually I'm hoping to remove --split-project and then generate_gradle.py can be cleaned up to not be a mirror of gn targets. All the references and things work now with only _all. WDYT? https://codereview.chromium.org/2837863002/diff/1/build/android/gradle/genera... File build/android/gradle/generate_gradle.py (right): https://codereview.chromium.org/2837863002/diff/1/build/android/gradle/genera... build/android/gradle/generate_gradle.py:561: def IsTestDir(path): On 2017/04/24 15:51:11, estevenson wrote: > nit: probably doesn't need to be a nested function since it doesn't use the > outer context. Done.
wnwen@chromium.org changed reviewers: + agrieve@chromium.org
Move agrieve@ to reviewers. See last email for context (forgot to add in last email).
The CQ bit was checked by wnwen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/04/24 17:40:43, Peter Wen wrote: > Move agrieve@ to reviewers. See last email for context (forgot to add in last > email). lgtm. I'd like to keep --split-projects around in case it becomes the better option in the future though (e.g. studio fixes all the bugs affecting it). One thing that will be lost with not having different modules are the AndroidManifest.xml files. E.g. Lint needs to know which manifest to use, with _all, which one would it pick?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work but is not actively maintained. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ========== to ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ==========
Updated description to reflect that --split-projects flag should keep working. Currently we're just using the dummy AndroidManifest.xml. I think the best way to do this is to only use _all if there is more than just a single *_apk target. That way for single *_apk targets we can use its AndroidManifest.xml (it acts like _all already) and if there are more than one AndroidManifest, Android Studio doesn't handle that very well anyways. WDYT?
On 2017/04/24 19:05:33, Peter Wen wrote: > Updated description to reflect that --split-projects flag should keep working. > > Currently we're just using the dummy AndroidManifest.xml. I think the best way > to do this is to only use _all if there is more than just a single *_apk target. > > That way for single *_apk targets we can use its AndroidManifest.xml (it acts > like _all already) and if there are more than one AndroidManifest, Android > Studio doesn't handle that very well anyways. > > WDYT? If that sounds good then I'll add that and documentation in this CL.
On 2017/04/24 19:07:12, Peter Wen wrote: > On 2017/04/24 19:05:33, Peter Wen wrote: > > Updated description to reflect that --split-projects flag should keep working. > > > > Currently we're just using the dummy AndroidManifest.xml. I think the best way > > to do this is to only use _all if there is more than just a single *_apk > target. > > > > That way for single *_apk targets we can use its AndroidManifest.xml (it acts > > like _all already) and if there are more than one AndroidManifest, Android > > Studio doesn't handle that very well anyways. > > > > WDYT? > > If that sounds good then I'll add that and documentation in this CL. Sounds good.
The CQ bit was checked by wnwen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Added exception and updated docs. PTAL one last time. Thanks! 🍵
Description was changed from ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag should still work. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ========== to ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag can be used to see the dependency graph, and when only a single module will be generated, the _all pseudo module will not replace it. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ==========
lgtm
The CQ bit was unchecked by wnwen@chromium.org
The CQ bit was checked by wnwen@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from estevenson@chromium.org Link to the patchset: https://codereview.chromium.org/2837863002/#ps60001 (title: "Update docs.")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1493306387643620, "parent_rev": "13d8b0a4a7b94f2da075aeeecf2f7231115a9e07", "commit_rev": "e851ad470036997a9a43b0ee2710442f1b5c2096"}
Message was sent while issue was closed.
Description was changed from ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag can be used to see the dependency graph, and when only a single module will be generated, the _all pseudo module will not replace it. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 ========== to ========== Android: Remove apk modules for Android Studio It is no longer necessary to list all the apk targets as separate modules now that we have the _all pseudo module. Having the separate modules resulted in bugs where Android Studio could not distinguish between prod code and test code since some modules viewed dirs as prod and some as test. The --split-projects flag can be used to see the dependency graph, and when only a single module will be generated, the _all pseudo module will not replace it. For android studio's _all pseudo module, move all known test dirs to androidTest instead of main so that they are properly displayed when filtered. BUG=620034 Review-Url: https://codereview.chromium.org/2837863002 Cr-Commit-Position: refs/heads/master@{#467704} Committed: https://chromium.googlesource.com/chromium/src/+/e851ad470036997a9a43b0ee2710... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/e851ad470036997a9a43b0ee2710... |