forked from gradle/gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·41 lines (36 loc) · 1.08 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
repositories {
mavenCentral()
}
val implementation by configurations.creating
val runtimeOnly by configurations.creating
// tag::define-dependency[]
dependencies {
implementation("org.hibernate:hibernate-core:3.6.7.Final")
}
// end::define-dependency[]
// tag::use-configuration[]
tasks.register("listJars") {
val implementation: FileCollection = configurations["implementation"]
doLast {
implementation.forEach { file: File -> println(file.name) }
}
}
// end::use-configuration[]
// tag::module-dependencies[]
dependencies {
runtimeOnly(group = "org.springframework", name = "spring-core", version = "2.5")
runtimeOnly("org.springframework:spring-aop:2.5")
runtimeOnly("org.hibernate:hibernate:3.0.5") {
isTransitive = true
}
runtimeOnly(group = "org.hibernate", name = "hibernate", version = "3.0.5") {
isTransitive = true
}
}
// end::module-dependencies[]
// tag::file-dependencies[]
dependencies {
runtimeOnly(files("libs/a.jar", "libs/b.jar"))
runtimeOnly(fileTree("libs") { include("*.jar") })
}
// end::file-dependencies[]