From a2bf67c600f8b165a0bad4465cfc678c520872eb Mon Sep 17 00:00:00 2001 From: Mishkun Date: Sat, 5 Oct 2024 22:21:41 +0200 Subject: [PATCH] Prettify configuration --- build.gradle.kts | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2b67ee6..39bd2bc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,17 +18,30 @@ java { } } -val uiTestConfiguration by configurations.registering { - isCanBeResolved = true - isCanBeConsumed = false -} val uiTest by sourceSets.registering { kotlin.srcDirs("src/uiTest/kotlin") resources.srcDir("src/uiTest/resources") - compileClasspath += sourceSets.main.get().output + configurations.testCompileClasspath.get() + configurations.compileClasspath.get() + uiTestConfiguration.get() - runtimeClasspath += sourceSets.main.get().output + configurations.testRuntimeClasspath.get() + configurations.runtimeClasspath.get() + uiTestConfiguration.get() + compileClasspath += sourceSets.main.get().output + runtimeClasspath += sourceSets.main.get().output +} + +val uiTestImplementation by configurations.getting { + extendsFrom(configurations.testImplementation.get()) +} + +val uiTestRuntimeOnly by configurations.getting { + extendsFrom(configurations.testRuntimeOnly.get()) +} + +kover { + merge { + projects(":") + sources { + excludedSourceSets.add("uiTest") + } + } } val uiTests by intellijPlatformTesting.testIdeUi.registering { @@ -92,7 +105,7 @@ dependencies { intellijPlatform { intellijIdeaCommunity("2024.2.3") testFramework(TestFrameworkType.Platform) - testFramework(TestFrameworkType.Starter, configurationName = uiTestConfiguration.name) + testFramework(TestFrameworkType.Starter, configurationName = "uiTestImplementation") pluginVerifier() } implementation("com.typesafe:config:1.4.2")