-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle
64 lines (52 loc) · 1.45 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
plugins {
id "org.sonarqube" version "2.7"
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
group = 'com.gourav'
version = '0.0.1-SNAPSHOT'
description = """restApi"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
task copyToLib(type: Copy) {
into "$buildDir/libs"
from(configurations.compile)
}
stage.dependsOn(copyToLib)
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb', version:'2.1.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:'2.1.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.1.1.RELEASE'
compile group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:'2.1.1.RELEASE'
}
gradle.taskGraph.whenReady {
taskGraph ->
if (taskGraph.hasTask(stage)) {
test.enabled = false
}
}
jar {
manifest {
attributes 'Main-Class': 'com.gourav.restapi.RestApiApplication'
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport
sonarqube {
androidVariant 'fullDebug'
}