Gradle 7.0 中 compile
,runtime
、testCompile和testRuntime
被替换为
implementation
、runtimeOnly
、testImplementation
和testRuntimeOnly
可以解决以下问题:
1.Could not find method compile() for arguments [com.huaban:jieba-analysis:1.0.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
2.Could not get unknown property 'runtime' for configuration ':distJars' of type org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.
3.Could not find method testCompile() for arguments [junit:junit:4.12] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.