|
| 1 | +import io.gitlab.arturbosch.detekt.Detekt |
| 2 | +import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 |
| 3 | +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion |
| 4 | + |
| 5 | +plugins { |
| 6 | + id("com.android.library") |
| 7 | + alias(libs.plugins.kotlin.android) |
| 8 | + alias(libs.plugins.gradle.versions) |
| 9 | + alias(libs.plugins.detekt) |
| 10 | +} |
| 11 | + |
| 12 | +android { |
| 13 | + compileSdk = libs.versions.compileSdk.get().toInt() |
| 14 | + namespace = "io.sentry.compose.navigation3" |
| 15 | + |
| 16 | + defaultConfig { |
| 17 | + minSdk = 23 // Nav3 requires minSdk 23 |
| 18 | + } |
| 19 | + |
| 20 | + buildTypes { |
| 21 | + getByName("debug") { consumerProguardFiles("proguard-rules.pro") } |
| 22 | + getByName("release") { consumerProguardFiles("proguard-rules.pro") } |
| 23 | + } |
| 24 | + |
| 25 | + kotlin { |
| 26 | + compilerOptions.jvmTarget = JVM_1_8 |
| 27 | + compilerOptions.languageVersion = KotlinVersion.KOTLIN_1_9 |
| 28 | + compilerOptions.apiVersion = KotlinVersion.KOTLIN_1_9 |
| 29 | + } |
| 30 | + |
| 31 | + lint { |
| 32 | + warningsAsErrors = true |
| 33 | + checkDependencies = true |
| 34 | + |
| 35 | + // We run a full lint analysis as build part in CI, so skip vital checks for assemble tasks. |
| 36 | + checkReleaseBuilds = false |
| 37 | + } |
| 38 | + |
| 39 | + androidComponents.beforeVariants { |
| 40 | + it.enable = !Config.Android.shouldSkipDebugVariant(it.buildType) |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +kotlin { explicitApi() } |
| 45 | + |
| 46 | +tasks.withType<Detekt>().configureEach { |
| 47 | + // Target version of the generated JVM bytecode. It is used for type resolution. |
| 48 | + jvmTarget = JavaVersion.VERSION_1_8.toString() |
| 49 | +} |
0 commit comments