-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Update AndroidManifestFinder for Gradle builds with kapt #2030
Update AndroidManifestFinder for Gradle builds with kapt #2030
Conversation
|
It even works for multiple flavor dimensions. :) |
WonderCsabo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works really well for kapt builds. Thanks!
However manifest finding for apt builds with multiple flavors is now broken. Can you fix it? I am wondering, maybe we should just skip listing all the directories in case of apt, and just use the old behaviour, this should also retain the performance.
Also, can you please add more tests? We should have tests when you have multiple flavors, for both kapt and apt.
| return Arrays.asList("build/intermediates/manifests/full" + gradleVariant, "build/intermediates/bundles" + gradleVariant, | ||
| "build/intermediates/manifests/aapt" + gradleVariant); | ||
| ArrayList<String> possibleLocations = new ArrayList<>(); | ||
| for (String directory : Arrays.asList("build/intermediates/manifests/full", "build/intermediates/bundles", "build/intermediates/manifests/aapt")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the for
|
|
||
| private void findPossibleLocations(String basePath, String targetPath, String variantPart, List<String> possibleLocations) { | ||
| String[] directories = new File(basePath + targetPath).list(); | ||
| if (directories == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the if
|
Not sure where exaclty you want new lines. |
|
The new commit fixes APT builds. (I'll squash commits when its ready) |
|
Thanks! Can you also add tests which use flavors? |
|
I'm on it :) |
|
@WonderCsabo tests added. |
|
What's the best way to test this? |
|
@ahornerr what i did is creating flavors in the example projects. |
|
merged commits and added requested new lines. |
|
I tested it again, works well, thanks! |
This should fix #2028
@WonderCsabo @ahornerr could you test this?