forked from gradle/gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
41 lines (36 loc) · 1.18 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
// tag::use-plugin[]
plugins {
war
}
// end::use-plugin[]
group = "gradle"
version = "1.0"
// tag::customization[]
val moreLibs = configurations.create("moreLibs")
repositories {
flatDir { dir("lib") }
mavenCentral()
}
dependencies {
implementation(module(":compile:1.0") {
dependency(":compile-transitive-1.0@jar")
dependency( ":providedCompile-transitive:1.0@jar")
})
providedCompile("javax.servlet:servlet-api:2.5")
providedCompile(module(":providedCompile:1.0") {
dependency(":providedCompile-transitive:1.0@jar")
})
runtimeOnly(":runtime:1.0")
providedRuntime(":providedRuntime:1.0@jar")
testImplementation("junit:junit:4.13")
moreLibs(":otherLib:1.0")
}
tasks.war {
webAppDirectory.set(file("src/main/webapp"))
from("src/rootContent") // adds a file-set to the root of the archive
webInf { from("src/additionalWebInf") } // adds a file-set to the WEB-INF dir.
classpath(fileTree("additionalLibs")) // adds a file-set to the WEB-INF/lib dir.
classpath(moreLibs) // adds a configuration to the WEB-INF/lib dir.
webXml = file("src/someWeb.xml") // copies a file to WEB-INF/web.xml
}
// end::customization[]