diff --git a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/KotlinAndroidPlugin.kt b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/KotlinAndroidPlugin.kt index fadc9258..f7d59642 100644 --- a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/KotlinAndroidPlugin.kt +++ b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/KotlinAndroidPlugin.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2022-2023 Harsh Shandilya. + * Copyright © 2022-2024 Harsh Shandilya. * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. @@ -30,10 +30,14 @@ class KotlinAndroidPlugin : Plugin { val composeCompilerVersion = libs.versions.composeCompiler.get() val kotlinVersion = libs.versions.kotlin.get() val matches = COMPOSE_COMPILER_VERSION_REGEX.find(composeCompilerVersion) - if (matches != null) { - val (compilerKotlinVersion) = matches.destructured - if (compilerKotlinVersion != kotlinVersion) { - project.tasks.withType().configureEach { + project.tasks.withType().configureEach { + compilerOptions.freeCompilerArgs.addAll( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true", + ) + if (matches != null) { + val (compilerKotlinVersion) = matches.destructured + if (compilerKotlinVersion != kotlinVersion) { compilerOptions.freeCompilerArgs.addAll( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=$kotlinVersion",