Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli-helper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {
id("ort-application-conventions")
}

// See https://docs.gradle.org/current/userguide/declaring_configurations.html#sec:configuration-flags-roles.
configurations.dependencyScope("pluginClasspath")
configurations["runtimeOnly"].extendsFrom(configurations["pluginClasspath"])

Expand Down
23 changes: 13 additions & 10 deletions cli-test-launcher/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ application {
}

val Project.hasFunTests
// Do not dig into sourceSets to avoid coupling between projects.
get() = projectDir.resolve("src/funTest").isDirectory
// Registering a feature automatically creates several configurations, see
// https://docs.gradle.org/current/userguide/how_to_create_feature_variants_of_a_library.html#sec::declare_feature_variants
get() = configurations.findByName("funTestRuntimeElements") != null

dependencies {
rootProject.subprojects.filter { it.hasFunTests }.forEach {
implementation(project(it.path)) {
capabilities {
// Note that this uses kebab-case although "registerFeature()" uses camelCase, see
// https://github.com/gradle/gradle/issues/31362.
@Suppress("UnstableApiUsage")
requireFeature("fun-test")
gradle.projectsEvaluated {
dependencies {
rootProject.subprojects.filter { it.hasFunTests }.forEach {
runtimeOnly(project(it.path)) {
capabilities {
// Note that this uses kebab-case although "registerFeature()" uses camelCase, see
// https://github.com/gradle/gradle/issues/31362.
@Suppress("UnstableApiUsage")
requireFeature("fun-test")
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins {
id("ort-application-conventions")
}

// See https://docs.gradle.org/current/userguide/declaring_configurations.html#sec:configuration-flags-roles.
configurations.dependencyScope("pluginClasspath")
configurations["runtimeOnly"].extendsFrom(configurations["pluginClasspath"])

Expand Down
Loading