I’m working on integrating Firebase Crashlyticsinto my Defold project using a custom native extension. According to the official Firebase Crashlytics setup guide, we need to add dependencies and plugins to both the project-level and app-level build.gradle files, like so:
Project-level build.gradle
buildscript {
dependencies {
classpath 'com.google.firebase:firebase-crashlytics-gradle:<latest-version>'
}
}
App level build.gradle:
plugins {
id 'com.google.firebase.crashlytics'
}
dependencies {
implementation 'com.google.firebase:firebase-crashlytics'
}
However, Defold’s native extension format only allows specifying one build.gradle
per extension (usually in the upload/
folder), and I can’t seem to control or inject code into both the project and app level build.gradle
files.
My Question
- How can I inject dependencies into both the root and app-level
build.gradle
files through a native extension in Defold? - Is there a supported or recommended way to apply the Crashlytics Gradle plugin inside a Defold native extension, or any known workarounds?