From 9348b7c444c3ef784094191207eb01e9e83524aa Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 23 Apr 2023 14:54:24 +0530 Subject: fix(build): switch kotlin-library plugin to `compilerOptions` DSL --- .../main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build-logic') 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 { override fun apply(project: Project) { project.pluginManager.apply(KotlinCommonPlugin::class) - project.tasks.withType().configureEach { - kotlinOptions { - if (!name.contains("test", ignoreCase = true)) { - freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") + project.tasks.withType().configureEach task@{ + compilerOptions { + if (!this@task.name.contains("test", ignoreCase = true)) { + freeCompilerArgs.add("-Xexplicit-api=strict") } } } -- cgit v1.2.3