-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
build.gradle
57 lines (49 loc) · 1.14 KB
/
build.gradle
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// tag::use-plugin[]
plugins {
id 'application'
}
// end::use-plugin[]
version = '1.0.2'
// tag::applicationName-conf[]
application.applicationName = 'my-app'
// end::applicationName-conf[]
// tag::mainClass-conf[]
application {
mainClass = 'org.gradle.sample.Main'
}
// end::mainClass-conf[]
// tag::mainModule-conf[]
application {
mainModule = 'org.gradle.sample.app' // name defined in module-info.java
mainClass = 'org.gradle.sample.Main'
}
// end::mainModule-conf[]
// tag::application-defaultjvmargs[]
application {
applicationDefaultJvmArgs = ['-Dgreeting.language=en']
}
// end::application-defaultjvmargs[]
// tag::executableDir-conf[]
application {
executableDir = 'custom_bin_dir'
}
// end::executableDir-conf[]
// tag::distribution-spec[]
tasks.register('createDocs') {
def docs = layout.buildDirectory.dir('docs')
outputs.dir docs
doLast {
docs.get().asFile.mkdirs()
docs.get().file('readme.txt').asFile.write('Read me!')
}
}
distributions {
main {
contents {
from(createDocs) {
into 'docs'
}
}
}
}
// end::distribution-spec[]