Update AndroidManifestFinder for Gradle builds with kapt#2030
Update AndroidManifestFinder for Gradle builds with kapt#2030WonderCsabo merged 2 commits intoandroidannotations:developfrom dodgex:2028_improve_manifestfinder_for_kapt_with_variants
Conversation
|
It even works for multiple flavor dimensions. :) |
WonderCsabo
left a comment
There was a problem hiding this comment.
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")) { |
|
|
||
| private void findPossibleLocations(String basePath, String targetPath, String variantPart, List<String> possibleLocations) { | ||
| String[] directories = new File(basePath + targetPath).list(); | ||
| if (directories == null) { |
|
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?