summaryrefslogtreecommitdiff
path: root/build-logic
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-04-23 14:54:24 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-04-23 14:54:24 +0530
commit9348b7c444c3ef784094191207eb01e9e83524aa (patch)
treefb50ac39f4677072dc85e00fcd16142b951d4ec9 /build-logic
parent57670ea04708e345f253a02baad3c7f8d5c3801f (diff)
fix(build): switch kotlin-library plugin to `compilerOptions` DSL
Diffstat (limited to 'build-logic')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt8
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")
}
}
}