Skip to content

Commit a5b5df7

Browse files
committed
Allow Develocity CI injection repository to be used as an included build
1 parent 650d269 commit a5b5df7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: build.gradle.kts

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ allprojects {
6868
}
6969

7070
val argbash by configurations.creating
71-
val develocityInjection = configurations.dependencyScope("develocityInjection").get()
71+
val develocityInjection = configurations.dependencyScope("develocityInjection") {
72+
attributes.attribute(Category.CATEGORY_ATTRIBUTE, objects.named("develocity-injection-script"))
73+
}.get()
7274
val develocityInjectionResolvable = configurations.resolvable("${develocityInjection.name}Resolvable") {
7375
extendsFrom(develocityInjection)
76+
attributes.attribute(Category.CATEGORY_ATTRIBUTE, objects.named("develocity-injection-script"))
7477
}
7578
val develocityComponents by configurations.creating {
7679
attributes.attribute(

Diff for: settings.gradle.kts

+9
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ rootProject.name = "build-validation-scripts"
2929
include("components/configure-gradle-enterprise-maven-extension")
3030

3131
project(":components/configure-gradle-enterprise-maven-extension").name = "configure-gradle-enterprise-maven-extension"
32+
33+
val develocityCiInjectionProjectDir = providers.gradleProperty("develocityCiInjectionProjectDir")
34+
if (develocityCiInjectionProjectDir.isPresent) {
35+
includeBuild(develocityCiInjectionProjectDir) {
36+
dependencySubstitution {
37+
substitute(module("com.gradle:develocity-injection")).using(project(":"))
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)