Gradle依赖声明类型

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

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

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

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

  • testImplementation —测试相当于 implementation

  • testRuntimeOnly —测试相当于 runtimeOnly

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.hibernate:hibernate-core:3.6.7.Final'
}

 

posted @ 2021-03-06 22:18  星小梦  阅读(149)  评论(0编辑  收藏  举报