From 2454a3c0b34bb0f35b7937369d62ad2b1a42a8d3 Mon Sep 17 00:00:00 2001 From: Art Shendrik Date: Thu, 22 Feb 2024 12:44:58 +0000 Subject: [PATCH] fix: remove invalid checks for composite mode Signed-off-by: Art Shendrik --- CHANGELOG.md | 1 + .../src/main/kotlin/fluxo/conf/FluxoKmpConfContext.kt | 4 +--- .../src/main/kotlin/fluxo/conf/FluxoKmpConfPlugin.kt | 2 +- .../src/main/kotlin/fluxo/conf/impl/kotlin/KotlinConfig.kt | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 408e5c14..55ff940f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Fixed - don't run in-memory shrinking if there is not enough memory available. - don't mark the project as in IDE sync mode when no tasks where called and no composite build detected. +- remove invalid checks for composite mode. - improve and document composite builds detection. - properly quote and escape CLI arguments for external tool runner. - fix R8 external run for Ubuntu and macOS (non-Windows systems). diff --git a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfContext.kt b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfContext.kt index b733fa62..3d21ee8c 100644 --- a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfContext.kt +++ b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfContext.kt @@ -200,9 +200,7 @@ internal abstract class FluxoKmpConfContext // Disable all tests if: // - `DISABLE_TESTS` is enabled; // - `check` or `test` tasks are excluded from the build; - // - the project is in a composite build. - testsDisabled = isInCompositeBuild || - project.disableTests().get() || + testsDisabled = project.disableTests().get() || start.excludedTaskNames.let { CHECK_TASK_NAME in it || TEST_TASK_NAME in it } if (testsDisabled) { diff --git a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfPlugin.kt b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfPlugin.kt index 670adf62..e8c3a9da 100644 --- a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfPlugin.kt +++ b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/FluxoKmpConfPlugin.kt @@ -78,7 +78,7 @@ public class FluxoKmpConfPlugin : Plugin { ctx.prepareBuildScanPlugin() ctx.ensureUnreachableTasksDisabled() - if (ctx.testsDisabled || ctx.isInCompositeBuild) { + if (ctx.testsDisabled) { return } diff --git a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/impl/kotlin/KotlinConfig.kt b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/impl/kotlin/KotlinConfig.kt index 0fd819f8..55761bf3 100644 --- a/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/impl/kotlin/KotlinConfig.kt +++ b/fluxo-kmp-conf/src/main/kotlin/fluxo/conf/impl/kotlin/KotlinConfig.kt @@ -146,7 +146,6 @@ internal fun FluxoConfigurationExtensionImpl.KotlinConfig( // TODO: Add env flag for dynamic switch-on when needed // (and enable by a task name if called directly) val latestCompilation = canUseLatestSettings && - !context.isInCompositeBuild && !context.testsDisabled && experimentalLatestCompilation == true