gpt4 book ai didi

java - 如何将 JUnit 5 与 build.gradle.kts 和 kotlin 一起使用?

转载 作者:IT老高 更新时间:2023-10-28 13:41:10 24 4
gpt4 key购买 nike

  • Java版本java 10.0.1 2018-04-17
  • Kotlin 版本 1.2.41
  • Gradle 版本 4.7

如果能用拼图模块系统就更好了

最佳答案

documentationsample project用于使用 Gradle 和 JUnit 5。

如果您想使用 Kotlin DSL,您必须通过以下方式对其进行调整:

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

对于 Jigsaw,Gradle 提供 experimental support还有一个 fork of the plugin提供附加功能。

关于java - 如何将 JUnit 5 与 build.gradle.kts 和 kotlin 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50324092/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com