-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
33 lines (28 loc) · 951 Bytes
/
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
plugins {
id 'java'
}
setTargetCompatibility(JavaVersion.VERSION_1_8)
setSourceCompatibility(JavaVersion.VERSION_1_8)
repositories{
mavenCentral()
}
dependencies{
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF8'
}
task Client (type: Jar) {
archiveFileName = "${project.archivesBaseName}-Client.jar"
manifest{ attributes 'Main-Class': "chat.client.Client" }
from{ configurations.compileClasspath.collect{ it.isDirectory() ? it : it.name.endsWith("pom") ? it : zipTree(it)}}
from files(sourceSets.main.output)
}
task Server (type: Jar) {
archiveFileName = "${project.archivesBaseName}-Server.jar"
manifest{
attributes 'Main-Class': "chat.net.Server"
}
from{ configurations.compileClasspath.collect{ it.isDirectory() ? it : it.name.endsWith("pom") ? it : zipTree(it)}}
from files(sourceSets.main.output)
}