Skip to content

Commit 12e4fff

Browse files
committed
chore: Simple warning when this DSL plugin is applied on non-root
1 parent c2e1625 commit 12e4fff

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
* `-Pslot=x/y`, and limiting tasks to those affected by git changes with
1011
* `-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)