after migration | before migration |
+-- index.js
+-- package.json
+-- MyModule1/
¦ +-- index1.js
¦ +-- package.json
+-- MyModule2/
¦ +-- index2.js
¦ +-- package.json
+-- platforms/
+-- android/
+-- myLibrary.jar
+-- myLibrary.aar
+-- include.gradle
|
+-- index.js
+-- package.json
+-- MyModule1/
¦ +-- index1.js
¦ +-- package.json
+-- MyModule2/
¦ +-- index2.js
¦ +-- package.json
+-- platforms/
+-- android/
+-- myLibrary.jar
+-- myLibrary.aar
+-- include.gradle
+-- AndroidManifest.xml
|
//default elements
android {
productFlavors {
"my-plugin" {
dimension "my-plugin"
}
}
}
As you can see in the android gradle plugin documentation the .aar files are therecommended way of using dependencies in the gradle build system. With the change concerning the plugin structure, we’ll get all the advantages gradle has to offer, without any of the disadvantages we had up till now. Let me give you some examples of why the current structure has problems.
...
+-- platforms/
+-- android/
+-- myLibrary.jar
+-- AndroidManifest.xml
When the AndroidManifest.xml is out in the open like that, if there are other plugins that also have an AndroidManifest.xml file and at some point they will have to be merged together. Currently there is no easy way for that to happen and we need to take additional steps to ensure the right output. When using .aar format, this is done automatically by gradle.
...
+-- platforms/
+-- android/
+-- myLibrary.jar
+-- myLibrary.aar
+-- AndroidManifest.xml
...
+-- platforms/
+-- android/
+-- myLibrary.jar
+-- AndroidManifest.xml
+--res/
If you are a {N} plugin developer you and you want your plugins to be verified, till now we only required a sample app, but now we need sample app + unit tests before you can claim you plugin to be verified.