forked from opencypher/morpheus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
108 lines (88 loc) · 3.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
plugins {
id 'com.github.hierynomus.license' version '0.15.0' apply false
id 'com.github.johnrengelman.shadow' version '4.0.3' apply false
id 'com.github.alisiikh.scalastyle_2.12' version '2.1.0' apply false
id 'me.champeau.gradle.jmh' version '0.4.8' apply false
id "ch.kk7.spawn" version "1.0.20180924200750" apply false
}
apply from: 'build.params.gradle'
apply plugin: 'base'
allprojects {
group = 'org.opencypher'
version = ver.self
}
apply from: 'build.licenses.gradle'
subprojects {
apply plugin: 'scala'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile group: 'org.scala-lang', name: 'scala-library', version: ver.scala.full
// Seems we need to lock these down, otherwise we get runtime errors on reflection
compile group: 'org.scala-lang', name: 'scala-reflect', version: ver.scala.full
compile group: 'org.scala-lang', name: 'scala-compiler', version: ver.scala.full
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: ver.log4j.main
compile group: 'org.apache.logging.log4j', name: "log4j-api-scala".scala(), version: ver.log4j.scala
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: ver.log4j.main
testCompile group: 'org.scalatest', name: "scalatest".scala(), version: ver.scalatest
testCompile group: 'org.scalacheck', name: "scalacheck".scala(), version: ver.scalacheck
testCompile group: 'org.junit.platform', name: 'junit-platform-runner', version: ver.junit.runner
}
test {
useJUnit()
}
ext.scalacParameters = [
"-target:jvm-$ver.jvm".toString(),
'-unchecked',
'-deprecation',
'-feature',
'-Xfatal-warnings',
'-Xfuture',
'-Ypartial-unification',
'-Ywarn-adapted-args'
]
tasks.withType(ScalaCompile) {
options.encoding = 'UTF-8'
scalaCompileOptions.additionalParameters = scalacParameters
}
tasks.withType(ScalaDoc) {
scalaDocOptions.additionalParameters = scalacParameters
}
task sourceJar(type: Jar) {
classifier = 'sources'
from(sourceSets.main.allSource)
}
task docJar(type: Jar) {
dependsOn tasks.scaladoc
classifier = 'javadoc'
from(tasks.scaladoc.destinationDir)
}
task testJar(type: Jar) {
classifier = 'tests'
from(sourceSets.test.output)
}
tasks.withType(Jar) {
from(tasks.generateLicensesFiles) {
into("META-INF/")
}
}
task dependencySearch(type: DependencyInsightReportTask) {
description 'Searches all projects for a dependency'
group 'help'
}
task runApp {
dependsOn tasks.classes
group 'run'
description 'Run a custom Scala app (use -PmainClass=com.my.package.App)'
doLast {
javaexec {
classpath = sourceSets.main.runtimeClasspath
main = project.getProperty("mainClass")
}
}
}
}
apply from: 'build.publishing.gradle'
apply from: 'build.style.gradle'