-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup build and ensure kotlin sources are included in api JAR
- Loading branch information
1 parent
59b99df
commit 6ff9cd8
Showing
4 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import org.gradle.jvm.tasks.Jar | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
dependencies { | ||
"api"("org.opentest4j:opentest4j:${properties["ota4jVersion"]}") | ||
"api"(project(":junit-platform-commons")) | ||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib") | ||
} | ||
|
||
tasks { | ||
"jar"(Jar::class) { | ||
manifest { | ||
attributes( | ||
mapOf( | ||
"Automatic-Module-Name" to "org.junit.jupiter.api" | ||
) | ||
) | ||
} | ||
} | ||
} | ||
|
||
configurations { | ||
"apiElements" { | ||
/* | ||
* Needed to configure kotlin to work correctly with the "java-library" plugin. | ||
* See: | ||
* https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_known_issues | ||
* https://youtrack.jetbrains.com/issue/KT-18497 | ||
*/ | ||
val compileKotlin: KotlinCompile by tasks | ||
outgoing | ||
.variants | ||
.getByName("classes") | ||
.artifact(mapOf( | ||
"file" to compileKotlin.destinationDir, | ||
"type" to "java-classes-directory", | ||
"builtBy" to compileKotlin | ||
)) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters