diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2023-04-23 14:54:24 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2023-04-23 14:54:24 +0530 |
commit | 9348b7c444c3ef784094191207eb01e9e83524aa (patch) | |
tree | fb50ac39f4677072dc85e00fcd16142b951d4ec9 /build-logic/src | |
parent | 57670ea04708e345f253a02baad3c7f8d5c3801f (diff) |
fix(build): switch kotlin-library plugin to `compilerOptions` DSL
Diffstat (limited to 'build-logic/src')
-rw-r--r-- | build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt index ad6ffc0b..e85d5c21 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt @@ -16,10 +16,10 @@ class KotlinLibraryPlugin : Plugin<Project> { override fun apply(project: Project) { project.pluginManager.apply(KotlinCommonPlugin::class) - project.tasks.withType<KotlinCompile>().configureEach { - kotlinOptions { - if (!name.contains("test", ignoreCase = true)) { - freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") + project.tasks.withType<KotlinCompile>().configureEach task@{ + compilerOptions { + if (!this@task.name.contains("test", ignoreCase = true)) { + freeCompilerArgs.add("-Xexplicit-api=strict") } } } |