fix missing crashlytics plugin
This commit is contained in:
parent
f1077efc17
commit
7e1ff25968
|
@ -1,8 +1,9 @@
|
||||||
plugins {
|
plugins {
|
||||||
id "st-application-conventions"
|
id "st-application-conventions"
|
||||||
|
alias libs.plugins.firebase.crashlytics apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
applyCrashlyticsIfRelease(project)
|
applyCrashlyticsIfRelease()
|
||||||
|
|
||||||
android {
|
android {
|
||||||
ndkVersion "25.0.8141415"
|
ndkVersion "25.0.8141415"
|
||||||
|
@ -104,3 +105,14 @@ dependencies {
|
||||||
implementation libs.kotlin.serialization
|
implementation libs.kotlin.serialization
|
||||||
debugImplementation libs.leakcanary
|
debugImplementation libs.leakcanary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def applyCrashlyticsIfRelease() {
|
||||||
|
if (isReleaseBuild && !isFoss()) {
|
||||||
|
project.apply plugin: libs.plugins.firebase.crashlytics.get().pluginId
|
||||||
|
project.afterEvaluate {
|
||||||
|
project.tasks.withType(com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask).configureEach {
|
||||||
|
it.googleServicesResourceRoot.set(project.file("src/release/res/"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
22
build.gradle
22
build.gradle
|
@ -1,35 +1,15 @@
|
||||||
plugins {
|
|
||||||
// alias(libs.plugins.android.application) apply false
|
|
||||||
// alias(libs.plugins.android.library) apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
def launchTask = getGradle()
|
def launchTask = getGradle()
|
||||||
.getStartParameter()
|
.getStartParameter()
|
||||||
.getTaskRequests()
|
.getTaskRequests()
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
def isReleaseBuild = launchTask.contains("bundleRelease") || launchTask.contains("assembleRelease")
|
ext.isReleaseBuild = launchTask.contains("bundlerelease") || launchTask.contains("assemblerelease")
|
||||||
ext.isDebugBuild = !isReleaseBuild
|
ext.isDebugBuild = !isReleaseBuild
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.applyCrashlyticsIfRelease = { project ->
|
|
||||||
println("is release $isReleaseBuild")
|
|
||||||
println("is foss ${isFoss()}")
|
|
||||||
if (isReleaseBuild && !isFoss()) {
|
|
||||||
println("run craslytics")
|
|
||||||
|
|
||||||
project.apply plugin: 'com.google.firebase.crashlytics'
|
|
||||||
project.afterEvaluate {
|
|
||||||
project.tasks.withType(com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask).configureEach {
|
|
||||||
it.googleServicesResourceRoot.set(project.file("src/release/res/"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ext.kotlinTest = { dependencies ->
|
ext.kotlinTest = { dependencies ->
|
||||||
dependencies.testImplementation libs.kluent
|
dependencies.testImplementation libs.kluent
|
||||||
dependencies.testImplementation libs.kotlin.test
|
dependencies.testImplementation libs.kotlin.test
|
||||||
|
|
|
@ -14,8 +14,6 @@ android-library = { id = "com.android.library", version.ref = "android-gp" }
|
||||||
android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||||
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
||||||
crashlytics = { id = "org.jetbrains.kotlin.plugin.parcelize", version = "1.8.0-RC" }
|
|
||||||
|
|
||||||
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.2" }
|
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.2" }
|
||||||
|
|
||||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||||
|
|
Loading…
Reference in New Issue