-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
52 lines (43 loc) · 944 Bytes
/
build.gradle
File metadata and controls
52 lines (43 loc) · 944 Bytes
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
// project plugins
plugins {
id 'java'
}
// lab version
version = '1.0'
// dependencies repositories
repositories {
mavenCentral()
}
// compile and test dependencies
dependencies {
implementation 'commons-cli:commons-cli:1.4'
implementation files('lib/java-cup-11b-runtime.jar')
}
// change source sets
sourceSets {
main {
java { srcDirs = [ 'src' ] }
}
}
jar {
archiveBaseName.set('lab7')
archiveVersion.set(version) // or leave out if you don't want a version suffix
manifest {
attributes(
'Main-Class': 'Main',
'Implementation-Title': 'Lab 7',
'Implementation-Version': version
)
}
// create fat jar
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
// java source and target compatibility
sourceCompatibility = 1.11
targetCompatibility = 1.11
// compile java source code in UTF-8
compileJava.options.encoding = 'UTF-8'