-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (97 loc) · 3.02 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
111
112
113
114
115
116
buildscript {
ext.kotlin_version = '1.1.51'
ext.scala_version = '2.11.8'
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
// classpath "gradle.plugin.com.github.maiflai:gradle-scalatest:0.16"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.8.0"
// classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.0'
classpath 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:0.8.2'
}
}
apply plugin: "jacoco"
apply plugin: "com.diffplug.gradle.spotless"
apply plugin: 'scalaStyle'
version = '1.0'
def specs2_version = "4.0.1"
subprojects {
apply plugin: 'scala'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: "com.diffplug.gradle.spotless"
apply plugin: 'scalaStyle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "http://repo1.maven.org/maven2/" }
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/releases"
}
}
spotless {
scala {
scalafmt()
// optional: you can specify a specific version or config file
// scalafmt('0.5.1').configFile('scalafmt.conf')
}
}
dependencies {
compile "org.scala-lang:scala-library:$scala_version"
testCompile "org.specs2:specs2-core_2.11:$specs2_version"
testCompile "org.specs2:specs2-junit_2.11:$specs2_version"
testCompile "org.specs2:specs2-html_2.11:$specs2_version"
testCompile "org.specs2:specs2-form_2.11:$specs2_version"
testCompile "org.specs2:specs2-analysis_2.11:$specs2_version"
testCompile "org.specs2:specs2-scalacheck_2.11:$specs2_version"
// testCompile group: 'org.scalamock', name: 'scalamock-scalatest-support_2.11', version: '3.6.0'
testCompile 'junit:junit:4.12'
}
version = '1.0'
jar {
manifest.attributes provider: 'gradle'
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/releases"
}
}
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
xml.destination "${buildDir}/reports/jacoco/report.xml"
html.enabled true
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}
task wrapper(type: Wrapper) {
gradleVersion = "2.7"
}
jacoco {
toolVersion = "0.7.6.201602180812"
reportsDir = file("$buildDir/customJacocoReportDir")
}