plugins { id "st-base-conventions" apply false } def launchTask = getGradle() .getStartParameter() .getTaskRequests() .toString() .toLowerCase() ext.isReleaseBuild = launchTask.contains("bundlerelease") || launchTask.contains("assemblerelease") ext.isDebugBuild = !isReleaseBuild subprojects { tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions { jvmTarget = "1.8" freeCompilerArgs = [ '-opt-in=kotlin.contracts.ExperimentalContracts', '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi', ] } } } task clean(type: Delete) { delete rootProject.buildDir } ext.kotlinTest = { dependencies -> dependencies.testImplementation libs.kluent dependencies.testImplementation libs.kotlin.test dependencies.testImplementation libs.mockk dependencies.testImplementation libs.kotlin.coroutines.test } ext.kotlinFixtures = { dependencies -> dependencies.testFixturesImplementation libs.mockk dependencies.testFixturesImplementation libs.kluent dependencies.testFixturesImplementation libs.kotlin.coroutines } ext.androidImportFixturesWorkaround = { project, fixtures -> project.dependencies.testImplementation(project.dependencies.testFixtures(fixtures)) project.dependencies.testImplementation fixtures.files("build/libs/${fixtures.name}-test-fixtures.jar") project.dependencies.testImplementation fixtures.files("build/libs/${fixtures.name}.jar") } ext.isFoss = { return rootProject.hasProperty("foss") } ext.firebase = { dependencies, name -> if (isFoss()) { dependencies.implementation(project(":domains:firebase:$name-noop")) } else { dependencies.implementation(project(":domains:firebase:$name")) } } if (launchTask.contains("codeCoverageReport".toLowerCase())) { apply from: 'tools/coverage.gradle' }