-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.gradle
118 lines (95 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
plugins {
id "java"
id "io.spring.dependency-management" version "1.0.8.RELEASE" apply false
id "org.springframework.boot" version "2.2.1.RELEASE" apply false
id "com.github.kt3k.coveralls" version "2.8.2"
id 'com.gorylenko.gradle-git-properties' version '2.2.0'
id "jacoco"
}
def sampleProjects = [project(':spring-boot-starter-mock-sample'), project('::spring-boot-starter-mock-sample2')]
def sdkProjects = [project(':mock-sqs-spring-boot-starter')]
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'com.gorylenko.gradle-git-properties'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'jacoco'
group = 'com.github.jojoldu'
version = '0.4.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.projectlombok:lombok'
implementation('org.springframework.boot:spring-boot-starter')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
jacocoTestReport {
reports {
html.enabled = true // human readable
xml.enabled = true // required by coveralls
}
}
}
configure(sampleProjects) {
dependencies {
implementation project(":mock-sqs-spring-boot-starter")
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('com.h2database:h2')
implementation('org.springframework.cloud:spring-cloud-starter-aws-messaging')
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-aws:2.1.4.RELEASE'
}
}
}
configure(sdkProjects) {
dependencies {
implementation('org.springframework.boot:spring-boot-starter-logging')
}
}
task jacocoRootReport(type: JacocoReport) {
description = 'Generates an aggregate report from all subprojects'
dependsOn = subprojects.test
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
html.enabled = true // human readable
xml.enabled = true // required by coveralls
}
}
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}