Skip to content

Commit d2a0af6

Browse files
committed
chore: Simple warning when this DSL plugin is applied on non-root
1 parent 472b505 commit d2a0af6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

buildSrc/src/main/kotlin/dd-trace-java.ci-jobs.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import datadog.gradle.plugin.ci.isInSelectedSlot
22
import org.gradle.api.tasks.testing.Test
33
import java.io.File
4+
import kotlin.math.abs
45

56
/*
67
* This plugin defines a set of tasks to be used in CI.
@@ -9,6 +10,11 @@ import java.io.File
910
* `-PtaskPartitionCount` and `-PtaskPartition`, and limiting tasks to those
1011
* affected by git changes with `-PgitBaseRef`.
1112
*/
13+
14+
if (project != rootProject) {
15+
logger.error("This plugin has been applied on a non-root project: ${project.path}")
16+
}
17+
1218
allprojects {
1319
// Enable tests only on the selected slot (if -Pslot=n/t is provided)
1420
tasks.withType<Test>().configureEach {

0 commit comments

Comments
 (0)