-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
110 lines (93 loc) · 3.08 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
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'com.palantir.docker' version '0.22.1'
id 'java'
id 'jacoco'
id 'checkstyle'
id "io.freefair.lombok" version "5.0.0-rc4"
}
group = 'com.mempoolexplorer'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
}
ext {
set('springCloudVersion', "Hoxton.SR1")
}
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'org.apache.logging.log4j') {
details.useVersion '2.17.0'
details.because 'zero-day-exploits suck'
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
implementation 'org.springframework.cloud:spring-cloud-stream'
implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka'
implementation 'org.springframework.kafka:spring-kafka'
//implementation 'org.springframework.boot:spring-boot-starter-security'
//Other dependencies
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.apache.commons:commons-collections4:4.1'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.cloud:spring-cloud-stream-test-support'
testImplementation 'org.springframework.kafka:spring-kafka-test'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
//Fails with less than 20% covering tests
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.2
}
}
}
}
//plugin checkstyle root file
checkstyle {
configFile = rootProject.file('./checkstyle.xml')
}
bootJar {
baseName = 'txMemPool'
version = '0.0.1-SNAPSHOT'
}
// Recommended buy complicated
//task unpack(type: Copy) {
// dependsOn bootJar
// from(zipTree(tasks.bootJar.outputs.files.singleFile))
// into("build/dependency")
//}
//docker {
// name "localhost:5000/tx_mempool:latest"
// copySpec.from(tasks.unpack.outputs).into("dependency")
// buildArgs(['DEPENDENCY': "dependency"])
//}
//Easy way
docker {
name "localhost:5000/tx_mempool:latest"
copySpec.from("build/libs/txMemPool-0.0.1-SNAPSHOT.jar").into("app")
buildArgs(['DEPENDENCY': "app"])
}