smalltalk-matrix/build.gradle

63 lines
1.9 KiB
Groovy
Raw Permalink Normal View History

plugins {
id "st-base-conventions" apply false
}
2022-02-24 22:55:56 +01:00
def launchTask = getGradle()
.getStartParameter()
.getTaskRequests()
.toString()
.toLowerCase()
2022-12-11 14:10:00 +01:00
ext.isReleaseBuild = launchTask.contains("bundlerelease") || launchTask.contains("assemblerelease")
ext.isDebugBuild = !isReleaseBuild
2022-02-24 22:55:56 +01:00
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',
]
}
}
}
2022-02-24 22:55:56 +01:00
task clean(type: Delete) {
delete rootProject.buildDir
}
ext.kotlinTest = { dependencies ->
2022-12-11 13:49:48 +01:00
dependencies.testImplementation libs.kluent
dependencies.testImplementation libs.kotlin.test
dependencies.testImplementation libs.mockk
dependencies.testImplementation libs.kotlin.coroutines.test
2022-02-24 22:55:56 +01:00
}
ext.kotlinFixtures = { dependencies ->
2022-12-11 13:49:48 +01:00
dependencies.testFixturesImplementation libs.mockk
dependencies.testFixturesImplementation libs.kluent
dependencies.testFixturesImplementation libs.kotlin.coroutines
2022-02-24 22:55:56 +01:00
}
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"))
}
}
2022-02-24 22:55:56 +01:00
if (launchTask.contains("codeCoverageReport".toLowerCase())) {
apply from: 'tools/coverage.gradle'
}