How to publish flutter aar to artifactory

Viewed 699

We have created a plugin in Flutter. Then we exported the "AAR" using "flutter build aar". Then included the AAR files to the native android app. Finally, we tried to publish the native as SDK. So that Native app users can use our flutter SDK.

When we included the local aar files created by flutter it worked fine. But after uploading the AAR to artifactory it was not working. Then we saw that the size of our SDK is only 43KB. Which means none of our flutter code got published into artifactory.

Then we uploaded the flutter plugin to artifactory manually using below code.

AAR(MavenPublication) {
            groupId "flutter.demo"
            artifactId "flutter_release"
            version = libraryVersion
            artifact("../../demo-flutter/build/host/outputs/repo/flutter/demo/flutter_release/$flutterSDKVersion/flutter_release-${flutterSDKVersion}.aar")
        }

But the app is crashing inside flutter Views.

0 Answers
Related