-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
149 lines (128 loc) · 4.56 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
buildscript {
apply from: 'gradle/dependencies.gradle'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath gradle_plugins.values()
}
}
plugins {
id 'java'
id "com.github.ben-manes.versions" version "0.51.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
// USE SEMANTIC VERSIONING AS SPECIFIED HERE: http://semver.org/spec/v2.0.0.html
//
// Major Release: X.0.0-RELEASE: Breaking Changes. Should be avoided if possible, or planned for future release.
// Minor Release: 0.X.0-RELEASE: Additional Features, updates from minor releases in Spring
// Micro Release: 0.0.X-RELEASE: Bugfixes, non-breaking changes, updates from micro releases in Spring
//
// DO NOT FORGET TO DOCUMENT CHANGES IN CHANGELOG.md
//
// Add a GitHub release for every new release: https://github.com/otto-de/edison-microservice/releases
// Publish artifacts to sonatype by executing the release.sh script. Don't publish packages to github.
//
//
def edison_version = "3.4.0-SNAPSHOT"
//
//
//
project.ext.set("debugUpload", false)
repositories {
mavenCentral()
maven { url 'http://repo.spring.io/libs-snapshot' }
}
nexusPublishing {
repositories {
sonatype()
}
}
apply from: "${rootDir}/gradle/maven.gradle"
group = 'de.otto.edison'
version = edison_version
subprojects {
apply plugin: 'eclipse'
apply plugin: 'project-report'
version = parent.version
group = parent.group
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
// Override some Spring Boot default versions
// see https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-customize-dependency-versions
ext['mockito.version'] = test_versions.mockito_core
ext['jackson.version'] = versions.jackson
// configurations.all {
// resolutionStrategy.eachDependency { DependencyResolveDetails details ->
// if (details.requested.group == 'ch.qos.logback') {
// details.useVersion versions.logback_classic
// }
// if (details.requested.group == 'com.fasterxml.jackson.core') {
// details.useVersion versions.jackson
// }
// if (details.requested.group == 'io.micrometer') {
// details.useVersion versions.micrometer
// }
// if (details.requested.group == 'io.netty' && !details.requested.name.startsWith('netty-tcnative')) {
// //details.useVersion versions.netty
// }
// if (details.requested.group == 'org.springframework') {
// details.useVersion versions.spring
// }
// if (details.requested.group == 'org.thymeleaf') {
// details.useVersion versions.thymeleaf
// }
// }
// }
task allDeps(type: DependencyReportTask) {}
apply from: "${rootDir}/gradle/idea.gradle"
apply from: "${rootDir}/gradle/compile.gradle"
apply from: "${rootDir}/gradle/test.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
apply from: "${rootDir}/gradle/maven.gradle"
apply from: "${rootDir}/gradle/signing.gradle"
dependencies {
compileOnly "org.springframework.boot:spring-boot-configuration-processor:${versions.spring_boot}"
constraints {
implementation 'junit:junit:4.13.2'
// some dependencies bring junit 4.12 which has a security vulnerability
}
}
targetCompatibility = '17'
sourceCompatibility = '17'
/*
// uncomment when using podman
test {
OperatingSystem os = DefaultNativePlatform.currentOperatingSystem;
if (os.isMacOsX()) {
environment "DOCKER_HOST", "unix:///tmp/podman.sock"
environment "TESTCONTAINERS_RYUK_DISABLED", "true"
}
}
*/
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview', 'b', 'ea', 'pr'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
// This function converts Java version string '1.8' to '8'
static String compat(String src) {
if (src.contains('.')) {
src.substring(src.lastIndexOf('.') + 1)
} else {
src
}
}