Skip to content

Commit

Permalink
Use new 'requireFeature' syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Oct 18, 2024
1 parent 9cdf911 commit 2994830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins { id("org.example.gradle.component.application") }

application { mainClass = "org.example.product.app.Application" }

// Complicated notation for 'capabilities' - upvote: https://github.com/gradle/gradle/issues/25629
dependencies {
implementation(projects.bespin)
implementation(projects.corellia)
Expand All @@ -20,8 +19,7 @@ dependencies {
mockApiImplementation(libs.guava)

testImplementation(libs.junit.jupiter.api)

testEndToEndImplementation(projects.app) { capabilities { requireCapability("${project.group}:$name-mock-api") } }
testEndToEndImplementation(projects.app) { capabilities { requireFeature("mock-api") } }
testEndToEndImplementation(libs.guava)
testEndToEndImplementation(libs.junit.jupiter.api)
}
3 changes: 1 addition & 2 deletions bespin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
plugins { id("org.example.gradle.component.library") }

// For isolated-projects, use 'requireCapability' notation instead of testFixtures(...)
dependencies {
api(projects.corellia)
implementation(projects.coruscant)
implementation(libs.velocity.engine.core)

testImplementation(projects.corellia) { capabilities { requireCapability("${project.group}:$name-test-fixtures") } }
testImplementation(testFixtures(projects.corellia))
testImplementation(libs.junit.jupiter.api)
}

0 comments on commit 2994830

Please sign in to comment.