Commit 00405ad
committed
Fix include.gradle file generation
When `include.gradle` file is generated, there's a check if the App_Resources directory has been already parsed.
If there's AndroidManifest.xml in the app/App_Resources/Android the global variable appResExists is set to true.
All subsequent plugins will not be added to pluginNames and so will not be added to include.gradle.
For example in case you add AndroidManifest.xml in app/App_Resources and add nativescript-barcodescanner plugin, this is the generated include.gradle on Linux:
```
android {
flavorDimensions "NativescriptAppResources",
}
```
This way the build fails. The reason is that on Linux the file listing is different and App_Resources dir is processed before nativescript-barcodescanner.
The same project will work on Windows, but it is not guarantee that other projects will not fail in the same case.
In order to fix the issue, I've intorduced a new variable in the body of createDefaultIncludeFiles's iteration over files.
It is set to false on each iterration, so if the current dir is not App_Resources, the plugin will be added to `pluginNames`.
I've kept the code for setting `appResExists` as it is used on other places in the build.gradle.1 parent edbddfa commit 00405ad
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
0 commit comments