Gradle依赖声明类型

  • compileOnly —用于编译生产代码所必需的依赖关系,但不应作为运行时类路径的一部分

  • implementation(取代compile)-用于编译和运行时

  • runtimeOnly(取代runtime)-仅在运行时使用,不用于编译

  • testCompileOnlycompileOnly除了用于测试外,其他相同

  • testImplementation —测试相当于 implementation

  • testRuntimeOnly —测试相当于 runtimeOnly

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.hibernate:hibernate-core:3.6.7.Final'
}
复制请注明出处,在世界中挣扎的灰太狼
原文地址:https://www.cnblogs.com/XingXiaoMeng/p/14492651.html