-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (59 loc) · 2.04 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
plugins {
id "org.sonarqube" version "2.7"
id "java"
id "io.freefair.lombok" version "5.1.0"
}
sourceCompatibility = 11
targetCompatibility = 11
if (JavaVersion.current() != JavaVersion.VERSION_11) {
throw new GradleException("This build must be run with Java 11 and curretly used is " + JavaVersion.current())
}
int sonarPort = 9000
String vertXVersion = '3.9.1'
String log4jVersion = '2.13.3'
sourceSets {
main.java.srcDirs += 'src/main/java'
main.resources.srcDirs += "src/main/resources"
test.java.srcDirs += "src/test/java"
}
repositories {
mavenCentral()
}
jar {
manifest {
attributes 'Main-Class': 'com.murglin.consulting.invoice.VertxApplication'
}
destinationDir project.getBuildDir()
jar.getArchiveBaseName().set('vertx-invoice-service')
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
test {
useJUnitPlatform()
}
dependencies {
implementation "io.vertx:vertx-core:$vertXVersion"
implementation "io.vertx:vertx-web:$vertXVersion"
implementation "io.vertx:vertx-web-client:$vertXVersion"
implementation "io.vertx:vertx-config:$vertXVersion"
implementation "io.vertx:vertx-web-api-contract:$vertXVersion"
implementation "org.apache.logging.log4j:log4j-api:$log4jVersion"
implementation "org.apache.logging.log4j:log4j-core:$log4jVersion"
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'com.lmax:disruptor:3.4.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr353:2.11.1'
testCompile 'org.junit.jupiter:junit-jupiter:5.6.2'
}
/**
* Send source code on SonarQube for analysis.
*
* Login key is a user token(admin privileges).
* User token has to be used as a replacement of usual login.
*/
task sonar(type: Exec) {
commandLine "./gradlew sonarqube \\\n" +
" -Dsonar.projectKey=graphql-prototype \\\n" +
" -Dsonar.host.url=http://localhost:${sonarPort} \\\n" +
" -Dsonar.login=a781375dc7400c8f5a04f40bb61adff852a90086"
}