-
Notifications
You must be signed in to change notification settings - Fork 316
/
Copy pathbuild.gradle
75 lines (65 loc) · 1.98 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
plugins {
id 'groovy'
id 'org.springframework.boot'
id 'io.spring.dependency-management'
id 'maven-publish'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
mavenLocal()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
ext {
set('springCloudVersion', "${BOM_VERSION}")
set('camelVersion', "3.11.0")
}
println "Boot Version [${bootVersion}], Cloud version [${BOM_VERSION}]"
dependencies {
implementation("org.apache.camel.springboot:camel-spring-boot-starter:${camelVersion}")
implementation("org.apache.camel:camel-jackson:${camelVersion}")
implementation("org.apache.camel:camel-xstream:${camelVersion}")
implementation("org.apache.camel:camel-rabbitmq:${camelVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438")
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-stub-runner")
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
afterSuite { desc, result ->
if (!desc.parent) {
println "Results: (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
boolean skipTests = Boolean.parseBoolean(project.findProperty('SKIP_TESTS') ?: "false")
if (result.testCount == 0 && !skipTests) {
throw new IllegalStateException("No tests were found. Failing the build")
}
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact bootJar
// https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/273
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
}
}
}