Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kotlin contracts to exposed Kotlin API #3259

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -23,8 +23,7 @@ JUnit repository on GitHub.

==== New Features and Improvements

* ❓

* Introduced kotlin contracts for kotlin assertion methods

[[release-notes-5.11.0-M1-junit-jupiter]]
=== JUnit Jupiter
Expand Down
8 changes: 8 additions & 0 deletions junit-jupiter-api/junit-jupiter-api.gradle.kts
Expand Up @@ -31,3 +31,11 @@ tasks {
}
}
}

kotlin {
sourceSets {
main {
languageSettings.optIn("kotlin.contracts.ExperimentalContracts")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do consumers of junit-jupiter-api also have to opt-in? If so, what happens of they don't?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, since we opt-in in the junit-jupiter-api, consumers don't need to specify any opt-ins in their code

}
}
}