Skip to content

Commit

Permalink
Add Provide-Capability OSGi header to engine bundles
Browse files Browse the repository at this point in the history
Fixes #2100
  • Loading branch information
kriegfrj committed Mar 29, 2021
1 parent e16bf9e commit c8f89e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions junit-jupiter-engine/junit-jupiter-engine.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import aQute.bnd.gradle.BundleTaskConvention;

plugins {
`kotlin-library-conventions`
`testing-conventions`
Expand All @@ -22,3 +24,16 @@ dependencies {
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
testImplementation("org.codehaus.groovy:groovy")
}

tasks {
jar {
withConvention(BundleTaskConvention::class) {
bnd("""
Provide-Capability:\
org.junit.platform.engine;\
org.junit.platform.engine='junit-jupiter';\
version:Version="${'$'}{version_cleanup;${project.version}}"
""")
}
}
}
5 changes: 5 additions & 0 deletions junit-vintage-engine/junit-vintage-engine.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ tasks {
org.junit.runner.*;version="[${versions.junit4Min},5)",\
org.junit.runners.model;version="[${versions.junit4Min},5)",\
*
Provide-Capability:\
org.junit.platform.engine;\
org.junit.platform.engine='junit-vintage';\
version:Version="${'$'}{version_cleanup;${project.version}}"
""")
}
}
Expand Down

0 comments on commit c8f89e3

Please sign in to comment.