作者:飞逝舞_975 | 来源:互联网 | 2022-12-09 10:14
我有一个gradle FAILURE:
..."Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0."
案例描述:
附加到项目代码库的下一个库:
APP/biuld.gradle
//(Required) Writing and executing Unit Tests on the JUnit Platform
testImplementation "org.junit.jupiter:junit-jupiter-api:5.2.0"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.2.0"
// (Optional) If you need "Parameterized Tests"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.2.0"
// (Optional) If you also have JUnit 4-based tests
testImplementation "junit:junit:4.12"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.2.0"
testImplementation "io.mockk:mockk:1.8.5"
更新了gradle-wrapper.properties
distributiOnUrl= https .... gradle- 4.4-all .zip to 4.7-all
毕竟那个gradle成功了
创造了测试calss
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestClass {
@Test
internal fun testName() {
Assert.assertEquals(2, 1 + 1)
}
}
运行测试并收到FAILURE消息.
使用命令行参数运行Gradle构建,./gradlew --warning-mode=all
以查看已弃用的功能究竟是什么.
结果我无法构建应用程序,我有失败的消息.
1> hotkey..:
使用命令行参数运行Gradle构建,--warning-mode=all
以查看已弃用的功能究竟是什么.
它将为您提供有关已发现问题的详细说明以及Gradle文档的链接,以获取有关如何修复构建的说明.
尝试运行`gradle build --warning-mode = all`
当运行`react-native run-android --warning-mode all`时,我得到`error:unknown option --warning-mode'