I have a question that mainly relates to gradle.
I use Crashlytics to report NDK crashes in my Android app. I have a task in build.gradle that calls ndk-build and compiles cpp files to a .so file. At the end of this task, I want to call a task that loads the generated characters into Crashlytics.
After installing the Fabric plugin in Android Studio, I saw new tasks that were added to the Gradle tab. One of them is crashlyticsUploadSymbols [buildType] [flavor], where buildType and flavor indicate which type of build and flavor are currently selected.
This task seems to load a character file.
My question is, Is it possible to call this task from inside build.gradle? I am currently using a manual call on an Android Studio terminal tab in the form:
./gradlew crashlyticsUploadSymbols [buildType] [flavor]
Is it possible to somehow call this task from inside build.gradle?
To call this task, I use finalizedBy at the end of the buildNdk task, so as soon as buildNdk finishes, the download task will be completed.
It is also very important how can I get the current buildType and taste so that I can add it to the crashlyticsUploadSymbols call?
Thanks!
source share