mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
feat: enable Compose strong skipping mode
This commit is contained in:
parent
a410267f99
commit
659eaf9789
1 changed files with 9 additions and 5 deletions
|
@ -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
|
* Use of this source code is governed by an MIT-style
|
||||||
* license that can be found in the LICENSE file or at
|
* license that can be found in the LICENSE file or at
|
||||||
* https://opensource.org/licenses/MIT.
|
* https://opensource.org/licenses/MIT.
|
||||||
|
@ -30,10 +30,14 @@ class KotlinAndroidPlugin : Plugin<Project> {
|
||||||
val composeCompilerVersion = libs.versions.composeCompiler.get()
|
val composeCompilerVersion = libs.versions.composeCompiler.get()
|
||||||
val kotlinVersion = libs.versions.kotlin.get()
|
val kotlinVersion = libs.versions.kotlin.get()
|
||||||
val matches = COMPOSE_COMPILER_VERSION_REGEX.find(composeCompilerVersion)
|
val matches = COMPOSE_COMPILER_VERSION_REGEX.find(composeCompilerVersion)
|
||||||
if (matches != null) {
|
project.tasks.withType<KotlinCompile>().configureEach {
|
||||||
val (compilerKotlinVersion) = matches.destructured
|
compilerOptions.freeCompilerArgs.addAll(
|
||||||
if (compilerKotlinVersion != kotlinVersion) {
|
"-P",
|
||||||
project.tasks.withType<KotlinCompile>().configureEach {
|
"plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true",
|
||||||
|
)
|
||||||
|
if (matches != null) {
|
||||||
|
val (compilerKotlinVersion) = matches.destructured
|
||||||
|
if (compilerKotlinVersion != kotlinVersion) {
|
||||||
compilerOptions.freeCompilerArgs.addAll(
|
compilerOptions.freeCompilerArgs.addAll(
|
||||||
"-P",
|
"-P",
|
||||||
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=$kotlinVersion",
|
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=$kotlinVersion",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue