Replies: 3 comments 12 replies
-
Android platformsI think I raised a similar thing with Adobe years ago when we started supporting Intel processors on Android. The duplication seems completely unnecessary. Even when we do use native code in our extensions we generally put it in a Eg from our scanner extension:
And this is then duplicated across each platform inside the ANE. This hasn't been much of a concern though as it's just a filesize issue with the ANE and doesn't affect the output app so we haven't pushed too hard on it. This definitely could be an improvement in the future, something as simple as adding an <extension xmlns="http://ns.adobe.com/air/extension/24.0">
<id>com.distriqt.Scanner</id>
<versionNumber>5.0.58</versionNumber>
<platforms>
<platform name="Android">
<applicationDeployment>
<nativeLibrary>distriqt.extension.scanner.android.jar</nativeLibrary>
<initializer>com.distriqt.extension.scanner.ScannerExtension</initializer>
<finalizer>com.distriqt.extension.scanner.ScannerExtension</finalizer>
</applicationDeployment>
</platform>
<!-- other platforms -->
</platforms>
</extension> One concern I have here is how older IDE's (I'm thinking FlashBuilder mainly here) will handle this change as they seem to inspect the ANEs for supported platforms and show errors if not available. So I would be cautious jumping into these changes without thorough IDE tests. GradleI think you have summarised the points I suggested fairly well here. What I'd like to be able to do is move our dependency ANEs to a simple gradle line. Eventually this will remove the need for these dependency ANEs altogether. As a migration step we would just remove all packaged dependency libraries and resources in those ANEs and replace with the gradle line. So if I look at the <platform xmlns="http://ns.adobe.com/air/extension/24.0">
<copyright>2019 // distriqt</copyright>
<packagedDependencies>
<packagedDependency>material-1.0.0.jar</packagedDependency>
</packagedDependencies>
<packagedResources>
<packagedResource>
<packageName>com.google.android.material</packageName>
<folderName>material-1.0.0-res</folderName>
</packagedResource>
</packagedResources>
</platform> to a gradle based one like: <platform xmlns="http://ns.adobe.com/air/extension/24.0">
<copyright>2021 // distriqt</copyright>
<packagedDependencies>
</packagedDependencies>
<packagedResources>
</packagedResources>
<gradle>
<repositories>
<repository>google()</repository>
</repositories>
<dependencies>
<dependency>implementation 'com.google.android.material:material:1.0.0'</dependency>
</dependencies>
</gradle>
</platform> These Then there is also the requirement of adding the repository that the dependency can be found in. This is added to the project There are further additions I can think of (around plugins eg for Firebase), but they can perhaps be a phase 2? It is important that this works with both AARUsing
However this adds the additional requirement of being able to pass in configuration items. Many libraries require additions to the manifest that are specified in the I would see this as requiring some additions to the android node in the application descriptor. PrioritiesThe current ANE structure is "working" so I'd like to make sure that these improvements don't get in the way of producing a stable AIR output, which I think should be number 1 priority. I don't think anything here is critical or blocking development with AIR currently. Regarding these features however, I would prioritise the work as follows:
|
Beta Was this translation helpful? Give feedback.
-
Is this feature implemented now? |
Beta Was this translation helpful? Give feedback.
-
PING @ajwfrost PING @marchbold PING Was this somehow updated (improved) since recent years? I'm right now making a new ANE for Android and I wonder if I still need to duplicate jar and other resources files for each Android platform (Android-ARM, Android-ARM64, Android-x86, Android-x64) when evaluating And as my new ANE needs shared libraries as well, is it now possible to provide just a single |
Beta Was this translation helpful? Give feedback.
-
Capturing some thoughts here that came out of a fix we just did for ANEs on Android...
Currently on Android:
Since we're moving over to an approach that generates an Android Studio style project before building this with the standard Gradle toolchain, it gives us an opportunity to change what we're doing...
Thoughts to be added below please! From an initial discussion with Distriqt there are a couple of ideas:
The suggestion for a new set of dependencies for Android libraries would be something like:
Any other thoughts/suggestions, please add them below!
thanks
Andrew
Beta Was this translation helpful? Give feedback.
All reactions