Skip to content

Commit

Permalink
chore(dependencies): add dependencies on spinnaker-dependencies (#1126)
Browse files Browse the repository at this point in the history
When projects have dependencies on artifacts, but depend on spinnaker-dependencies to
provide the version, this makes the version available and removes failures from ./gradlew
dependencies output.

Some examples of failures that this removes:

testRuntimeOnlyDependenciesMetadata
+--- org.junit.jupiter:junit-jupiter-engine FAILED
\--- org.junit.platform:junit-platform-launcher FAILED

compileOnly - Compile only dependencies for compilation 'main' (target  (jvm)).
\--- org.projectlombok:lombok FAILED

compileOnlyDependenciesMetadata
\--- org.projectlombok:lombok FAILED

testCompileOnly - Compile only dependencies for compilation 'test' (target  (jvm)).
\--- org.projectlombok:lombok FAILED

testCompileOnlyDependenciesMetadata
\--- org.projectlombok:lombok FAILED
  • Loading branch information
dbyron-sf authored Dec 5, 2023
1 parent 05b951e commit 2ae4f0b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gradle/kotlin-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
apply plugin: "kotlin"

dependencies {
testImplementation(platform(project(":spinnaker-dependencies")))
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"

testImplementation "org.junit.jupiter:junit-jupiter-api"
Expand All @@ -29,6 +30,7 @@ dependencies {
testImplementation "dev.minutest:minutest"
testImplementation "io.mockk:mockk"

testRuntimeOnly(platform(project(":spinnaker-dependencies")))
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
}
Expand Down
2 changes: 2 additions & 0 deletions gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ apply plugin: "kotlin-spring"
apply plugin: "io.gitlab.arturbosch.detekt"

dependencies {
testImplementation(platform(project(":spinnaker-dependencies")))
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.platform:junit-platform-runner"
testImplementation "org.spekframework.spek2:spek-dsl-jvm"
Expand All @@ -28,6 +29,7 @@ dependencies {
testImplementation "dev.minutest:minutest"
testImplementation "io.mockk:mockk"

testRuntimeOnly(platform(project(":spinnaker-dependencies")))
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine"
Expand Down
2 changes: 2 additions & 0 deletions gradle/lombok.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
dependencies {
compileOnly "org.projectlombok:lombok"
compileOnly(platform(project(":spinnaker-dependencies")))
annotationProcessor "org.projectlombok:lombok"
annotationProcessor(platform(project(":spinnaker-dependencies")))
testCompileOnly "org.projectlombok:lombok"
testCompileOnly(platform(project(":spinnaker-dependencies")))
testAnnotationProcessor(platform(project(":spinnaker-dependencies")))
testAnnotationProcessor "org.projectlombok:lombok"
}
1 change: 1 addition & 0 deletions kork-actuator/kork-actuator.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ apply plugin: "java-library"
apply from: "$rootDir/gradle/kotlin-test.gradle"

dependencies {
compileOnly(platform(project(":spinnaker-dependencies")))
implementation(platform(project(":spinnaker-dependencies")))
implementation "org.springframework.security:spring-security-core"
implementation "org.springframework.boot:spring-boot-starter-security"
Expand Down
2 changes: 1 addition & 1 deletion kork-plugins-spring-api/kork-plugins-spring-api.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: "java-library"
apply from: "${project.rootDir}/gradle/kotlin-test.gradle"

dependencies {
implementation(platform(project(":spinnaker-dependencies")))
api(platform(project(":spinnaker-dependencies")))

api project(":kork-plugins-api")
api "org.springframework.boot:spring-boot-starter-web"
Expand Down

0 comments on commit 2ae4f0b

Please sign in to comment.