I have a question that mostly relates to gradle.
I'm using Crashlytics to report NDK crashes in my Android app. I have a task in build.gradle that calls ndk-build and compiles the cpp files into an .so file. At the end of this task I want to call a task that uploads generated symbols mapping to Crashlytics.
After installing the Fabric plugin in Android Studio, I saw there are some new tasks that were added to the Gradle tab. One of them is crashlyticsUploadSymbols[buildType][flavour] where buildType and flavour indicate which buildtype and flavour is currently selected.
This task does seem to upload a symbols file.
My question is, Is it possible to call this task from within build.gradle? Currently I use a manual call in Android Studio's terminal tab in the form of:
./gradlew crashlyticsUploadSymbols[buildType][flavour]
Is it possible to call this task somehow from within build.gradle?
To call this task I use finalizedBy at the end of the buildNdk task, so once buildNdk has finished, the upload task will execute.
Also very important, how can I get the current buildType and flavour so I am able to add it to the crashlyticsUploadSymbols call?
Thank you!
Error:(101, 0) Cannot add task ':App:externalNativeBuildProdDebug' as a task with that name already exists. <a href="openFile:/path/to/app/build.gradle">Open File</a>
so still have to upload manually :( – Crossruff