-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
74 lines (60 loc) · 2.23 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
plugins {
id 'java'
id 'idea'
id 'application'
}
repositories{
mavenCentral()
maven {
url = "https://maven.paube.de"
}
}
dependencies {
implementation group: 'de.upb.codingpirates.battleships', name: 'logic', version: project.logic_version
implementation group: 'de.upb.codingpirates.battleships', name: 'network', version: project.network_version
implementation group: 'de.upb.codingpirates.battleships', name: 'client', version: project.client_version
implementation group: 'com.google.inject', name: 'guice', version: '4.2.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.1'
runtime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.1'
implementation group: 'com.google.guava', name: 'guava', version: '28.2-jre'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
mainClassName = 'de.upb.codingpirates.battleships.desktop.BattleshipsDesktopClientApplication'
//enable Junit as testing platform for gradle to use for gradle task "test"
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task sourceJar(type: Jar){
classifier 'sources'
from sourceSets.main.allJava
}
jar{
manifest {
attributes 'Implementation-Title': 'Battleships Desktop App',
'Implementation-Version': "${project.version}",
'Main-Class': 'de.upb.codingpirates.battleships.desktop.BattleshipsDesktopClientApplication'
}
from ( configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } )
}
task fatJar(type: Jar){
manifest.from jar.manifest
archiveClassifier.set 'all'
from ( configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } ) {
exclude 'META-INF/**/*'
exclude 'log4j2.xml'
}
with jar
}
idea.module {
for (String excludeDirName in ["run", "build", "out", "logs", ".gradle", ".github"]) {
excludeDirs += new File(project.projectDir, excludeDirName)
}
}