-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
110 lines (95 loc) · 3.17 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
109
110
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Scala library project to get you started.
* For more details take a look at the Scala plugin chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.5.1/userguide/scala_plugin.html
*/
apply from: "config.gradle"
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
jcenter()
}
dependencies {
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:2.0.0"
classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1'
}
}
apply plugin: "com.github.spotbugs"
apply plugin: 'scalaStyle'
scalaStyle {
configLocation = "scalastyle_config.xml"
includeTestSourceDirectory = true
source = "src/main/scala"
testSource = "src/test/scala"
}
allprojects {
repositories {
mavenCentral()
}
apply plugin: 'idea'
group 'io.nornslab'
version '0.1'
}
subprojects {
apply plugin: 'java'
apply plugin: 'scala'
sourceCompatibility = rootProject.ext.version["minJavaVersion"]
targetCompatibility = rootProject.ext.version["minJavaVersion"]
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// applicationDefaultJvmArgs = ["-Dlog4j.configuration=log4j.properties"]
task wrapper(type: Wrapper) {
gradleVersion = '5.6.2'
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = [
"-deprecation",
"-unchecked",
"-encoding", "utf8",
"-Xlog-reflective-calls",
"-feature",
"-language:postfixOps",
"-language:implicitConversions",
"-language:existentials",
"-Xlint:delayedinit-select",
"-Xlint:doc-detached",
"-Xlint:missing-interpolator",
"-Xlint:nullary-override",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow"
]
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-Xss2m']
}
}
dependencies {
compile rootProject.ext.dependencies["log4j"]
testCompile rootProject.ext.dependencies["slf4j-log4j12"]
compile rootProject.ext.dependencies["scala-library"]
compile rootProject.ext.dependencies["scala-compiler"]
testImplementation rootProject.ext.dependencies["junit"]
testCompile group: 'org.scalatest', name: 'scalatest_2.12', version: '3.2.0-M1'
}
}
def checkstyleConfigProperties(configFileName) {
[importControlFile: "$rootDir/checkstyle/$configFileName",
suppressionsFile : "$rootDir/checkstyle/suppressions.xml",
headerFile : "$rootDir/checkstyle/java.header"]
}