|
| 1 | +/* |
| 2 | + * Copyright (C) 2025 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>) |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + * |
| 16 | + * SPDX-License-Identifier: Apache-2.0 |
| 17 | + * License-Filename: LICENSE |
| 18 | + */ |
| 19 | + |
| 20 | +plugins { |
| 21 | + // Apply precompiled plugins. |
| 22 | + id("ort-application-conventions") |
| 23 | +} |
| 24 | + |
| 25 | +application { |
| 26 | + applicationName = "ort-test-launcher" |
| 27 | + mainClass = "io.kotest.engine.launcher.MainKt" |
| 28 | +} |
| 29 | + |
| 30 | +val Project.hasFunTests |
| 31 | + // Do not dig into sourceSets to avoid coupling between projects. |
| 32 | + get() = projectDir.resolve("src/funTest").isDirectory |
| 33 | + |
| 34 | +dependencies { |
| 35 | + rootProject.subprojects.filter { it.hasFunTests }.forEach { |
| 36 | + implementation(project(it.path)) { |
| 37 | + capabilities { |
| 38 | + // Note that this uses kebab-case although "registerFeature()" uses camelCase, see |
| 39 | + // https://github.com/gradle/gradle/issues/31362. |
| 40 | + @Suppress("UnstableApiUsage") |
| 41 | + requireFeature("fun-test") |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +tasks.named<Sync>("installDist") { |
| 48 | + duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 49 | +} |
0 commit comments