-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
80 lines (62 loc) · 1.97 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
75
76
77
78
79
80
def productionPath = rootDir.path + jarsFolder
allprojects {
apply plugin: 'idea'
apply plugin: 'scala'
apply plugin: 'java'
apply plugin: 'scalafmt'
sourceCompatibility = jdkVersion
repositories {
jcenter()
mavenCentral()
}
scalafmt {
configFilePath = ".scalafmt.conf"
}
dependencies {
implementation 'org.scala-lang:scala-library:2.12.7'
}
}
subprojects {
scaladoc.destinationDir = file(scaladocFolder)
dependencies {
testImplementation 'junit:junit:4.12'
testImplementation 'org.scalatest:scalatest_2.12:3.0.5'
testRuntime 'org.scala-lang.modules:scala-xml_2.11:1.0.6'
if (project.name == 'shared' || project.name == 'client') {
// tuProlog
implementation 'it.unibo.alice.tuprolog:tuprolog:3.3.0'
}
// op-rabbit
implementation 'com.spingo:op-rabbit-core_2.12:2.1.0'
implementation 'ch.qos.logback:logback-classic:1.1.7'
// mongodb
implementation 'org.mongodb.scala:mongo-scala-driver_2.12:2.5.0'
if (project.name != 'shared')
implementation project(':shared')
}
if (project.name == 'client' || project.name == 'login-guest' || project.name == 'matchmaking' || project.name == 'turn-ordering') {
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
baseName = rootProject.name
version = projectVersion
classifier = project.name
destinationDir = file(productionPath)
mergeServiceFiles('reference.conf')
}
}
clean {
delete(file(productionPath))
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
// shadow jar
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
// scalafmt
classpath 'cz.alenkacz:gradle-scalafmt:1.7.0'
}
}
defaultTasks 'clean', 'build', 'scalafmt', 'scaladoc'