-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
157 lines (122 loc) · 5.93 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
* 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 guide available at https://docs.gradle.org/4.9/userguide/scala_plugin.html
*/
import java.util.regex.Pattern
group 'com.digite'
version "${property('app.version')}"
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/"}
maven { url "https://dl.bintray.com/ngbinh/maven/" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${property('springBoot.version')}"
classpath "org.scoverage:gradle-scoverage:${property('gradle.scoverage.version')}"
classpath "org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.12:${property('scalaStyle.version')}"
}
}
apply plugin: 'scala'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.scoverage'
apply plugin: 'scalaStyle'
configurations {
compile.exclude module: 'spring-boot-starter-reactor-netty'
}
dependencies {
// scala
compile "org.scala-lang:scala-library:${property('scala.version')}"
// uncomment below java modules if using java 9+
//java modules
/*compile "javax.xml.bind:jaxb-api:${property('jaxb.version')}"
compile "org.glassfish.jaxb:jaxb-runtime:${property('jaxbRuntime.version')}"
compile "com.sun.activation:javax.activation:${property('activation.version')}""*/
// spring boot
compile("org.springframework.boot:spring-boot-starter:${property('springBoot.version')}"){
exclude module: "spring-boot-starter-logging"
}
compile("org.springframework.boot:spring-boot-starter-web:${property('springBoot.version')}"){
exclude module: "spring-boot-starter-tomcat"
exclude module: "spring-boot-starter-logging"
}
compile "com.fasterxml.jackson.module:jackson-module-scala_2.12:${property('jackson.version')}"
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-csv")
//embedded server
compile "org.springframework.boot:spring-boot-starter-undertow:${property('springBoot.version')}"
// uncomment below if want to use reactive framework with spring boot
//compile("org.springframework.boot:spring-boot-starter-webflux:${property('springBoot.version')}")
// logging
compile("org.springframework.boot:spring-boot-starter-log4j2:${property('springBoot.version')}"){
exclude module: "slf4j-log4j12"
exclude module: "log4j-slf4j-impl"
}
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile('org.springframework.boot:spring-boot-starter-data-mongodb-reactive')
compile "org.springframework.boot:spring-boot-starter-security"
compile("io.jsonwebtoken:jjwt:0.9.1")
implementation "javax.xml.bind:jaxb-api:2.2.11"
implementation "com.sun.xml.bind:jaxb-core:2.3.0.1"
implementation "com.sun.xml.bind:jaxb-impl:2.3.2"
implementation "javax.activation:activation:1.1.1"
compile 'org.javassist:javassist:3.18.2-GA' // workaround for ${javassist.version} placeholder issue*
compile ("com.github.mongobee:mongobee:0.13"){
exclude module: "mongo-java-driver"
}
compile "com.lmax:disruptor:${property('disruptor.version')}"
// monitoring
compile "org.springframework.boot:spring-boot-starter-actuator:${property('springBoot.version')}"
// documentation
compile "io.springfox:springfox-swagger2:${property('swagger.version')}"
compile "io.springfox:springfox-swagger-ui:${property('swagger.version')}"
compile("org.springframework.boot:spring-boot-devtools")
compile "org.owasp.antisamy:antisamy:${property('antisamy.version')}"
// testing
testCompile "junit:junit:${property('junit.version')}"
testCompile "org.scalatest:scalatest_2.12:${property('scalaTest.version')}"
testCompile "org.scalactic:scalactic_2.12:${property('scalaTest.version')}"
testCompile "org.scalacheck:scalacheck_2.12:${property('scalacheck.version')}"
testCompile("org.springframework.boot:spring-boot-starter-test:${property('springBoot.version')}"){
exclude module: "spring-boot-starter-logging"
}
// mocking
testCompile "org.powermock:powermock-module-junit4:${property('powermock.version')}"
testCompile "org.powermock:powermock-api-mockito2:${property('powermock.version')}"
// integration
testCompile "io.rest-assured:rest-assured:${property('restAssured.version')}"
testCompile "io.rest-assured:scala-support:${property('restAssured.version')}"
testCompile "io.rest-assured:json-schema-validator:${property('restAssured.version')}"
testCompile "com.intuit.karate:karate-apache:${property('karate-apache.version')}"
compile "com.intuit.karate:karate-core:${property('karate-core.version')}"
compile "org.apache.maven.plugins:maven-surefire-plugin:${property('maven-surefire-plugin.version')}"
compile "net.masterthought:cucumber-reporting:${property('cucumber-reporting.version')}"
//testCompile 'com.intuit.karate:karate-junit4:0.9.4'
//testCompile 'com.intuit.karate:karate-apache:0.9.4'
//testCompile group: 'junit', name: 'junit', version: '4.12'
// code coverage
scoverage("org.scoverage:scalac-scoverage-plugin_2.12:${property('scoverage.version')}"){
exclude group: "org.scala-lang"
exclude module: "scala-xml_2.11"
}
scoverage("org.scoverage:scalac-scoverage-runtime_2.12:${property('scoverage.version')}")
// Need scala-xml at test runtime
testRuntime "org.scala-lang.modules:scala-xml_2.12:${property('scalaXML.version')}"
}
// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
}
scalaStyle {
configLocation = "codeAnalysis/scalastyle_config.xml"
includeTestSourceDirectory = true
source = "src/main/scala"
testSource = "src/test/scala"
}
bootRun
{
main="com.digite.Main"
}