Skip to content

Commit 9a93ec8

Browse files
author
Julien Ruaux
committed
build: Using standardized gradle and jreleaser configs
1 parent 3dbedac commit 9a93ec8

File tree

3 files changed

+86
-33
lines changed

3 files changed

+86
-33
lines changed

build.gradle

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,49 @@ config {
22
info {
33
description = 'Redis Enterprise Admin'
44
inceptionYear = '2021'
5+
vendor = 'Redis'
56
tags = ['redis', 'enterprise', 'admin']
7+
68
links {
79
website = "https://github.com/redis-developer/${project.rootProject.name}"
810
issueTracker = "https://github.com/redis-developer/${project.rootProject.name}/issues"
911
scm = "https://github.com/redis-developer/${project.rootProject.name}.git"
1012
}
13+
1114
scm {
1215
url = "https://github.com/redis-developer/${project.rootProject.name}"
1316
connection = "scm:git:https://github.com/redis-developer/${project.rootProject.name}.git"
1417
developerConnection = "scm:git:git@github.com:redis-developer/${project.rootProject.name}.git"
1518
}
19+
1620
specification {
1721
enabled = true
1822
}
23+
1924
implementation {
2025
enabled = true
2126
}
27+
28+
people {
29+
person {
30+
id = 'jruaux'
31+
name = 'Julien Ruaux'
32+
roles = ['developer', 'author']
33+
}
34+
}
2235
}
2336

37+
docs {
38+
javadoc {
39+
autoLinks {
40+
enabled = false
41+
}
42+
}
43+
sourceHtml {
44+
enabled = false
45+
}
46+
}
47+
2448
licensing {
2549
enabled = false
2650
licenses {
@@ -30,55 +54,71 @@ config {
3054
}
3155
}
3256

33-
docs {
34-
javadoc {
35-
options {
36-
autoLinks {
37-
enabled = false
38-
}
39-
}
40-
aggregate {
41-
enabled = false
42-
}
57+
coverage {
58+
jacoco {
59+
enabled = true
60+
toolVersion = jacocoVersion
4361
}
4462
}
4563
}
4664

4765
allprojects {
4866
repositories {
49-
gradlePluginPortal()
50-
mavenCentral()
5167
mavenLocal()
68+
gradlePluginPortal()
5269
}
5370

5471
tasks.withType(GenerateModuleMetadata) {
5572
enabled = false
5673
}
74+
75+
tasks.withType(JavaCompile) {
76+
options.encoding = 'UTF-8'
77+
}
5778
}
5879

5980
subprojects {
6081
config {
6182
info {
6283
description = project.project_description
6384
}
64-
coverage {
65-
jacoco {
66-
toolVersion = '0.8.8'
67-
}
68-
}
85+
coverage {
86+
jacoco {
87+
toolVersion = jacocoVersion
88+
}
89+
}
6990
}
91+
92+
license {
93+
exclude('build/**')
94+
}
95+
7096
test {
7197
useJUnitPlatform()
7298
}
99+
73100
bootJar {
74101
enabled = false
75102
}
103+
76104
jar {
77105
enabled = true
78106
archiveClassifier = ''
79107
}
80108

81-
sourceCompatibility = 8
82-
targetCompatibility = 8
83-
109+
compileJava {
110+
options.release = 8
111+
}
112+
113+
configurations {
114+
all*.exclude module: 'spring-boot-starter-logging'
115+
}
116+
117+
configurations.all {
118+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
119+
if (details.requested.name == 'lettuce-core' ) {
120+
details.useVersion lettuceVersion
121+
}
122+
}
123+
}
84124
}

jreleaser.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ project:
22
name: redis-enterprise-admin
33
description: Redis Enterprise Admin
44
longDescription: Java admin client for Redis Enterprise
5-
website: https://github.com/redis-field-engineering/redis-enterprise-admin
5+
links:
6+
homepage: https://{{repoHost}}/{{repoOwner}}/{{repoName}}
67
authors:
78
- Julien Ruaux
89
license: Apache-2.0
910
java:
1011
groupId: com.redis
1112
version: 8
1213
multiProject: true
13-
extraProperties:
14-
inceptionYear: 2020
14+
inceptionYear: 2020
1515
tags:
1616
- 'redis'
1717
- 'enterprise'
@@ -24,7 +24,6 @@ release:
2424
changelog:
2525
formatted: ALWAYS
2626
preset: conventional-commits
27-
format: '- {{commitShortHash}} {{commitTitle}}'
2827
contributors:
2928
enabled: false
3029
labelers:
@@ -47,12 +46,26 @@ release:
4746
replacers:
4847
- search: 'deps: '
4948

50-
distributions:
51-
redis-enterprise-admin:
52-
artifacts:
53-
- path: subprojects/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
54-
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
49+
signing:
50+
active: ALWAYS
51+
armored: true
52+
53+
deploy:
54+
maven:
55+
pomchecker:
56+
version: 1.7.0
57+
nexus2:
58+
maven-central:
59+
active: RELEASE
60+
url: https://s01.oss.sonatype.org/service/local
61+
closeRepository: true
62+
releaseRepository: true
63+
stagingRepositories:
64+
- build/repos/local/release
5565

5666
files:
5767
artifacts:
58-
- path: VERSION
68+
- path: VERSION
69+
extraProperties:
70+
skipChecksum: true
71+
skipSigning: true

settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
buildscript {
22
repositories {
3-
gradlePluginPortal()
4-
mavenCentral()
53
mavenLocal()
4+
mavenCentral()
5+
gradlePluginPortal()
66
}
77
dependencies {
88
classpath "org.kordamp.gradle:java-project-gradle-plugin:$kordampPluginVersion"
9+
classpath "org.kordamp.gradle:jacoco-gradle-plugin:$kordampPluginVersion"
910
classpath "org.kordamp.gradle:kordamp-parentbuild:$kordampBuildVersion"
1011
classpath "org.springframework.boot:spring-boot-gradle-plugin:$bootPluginVersion"
1112
}
@@ -27,7 +28,6 @@ projects {
2728
}
2829
dirs(['subprojects']) {
2930
id 'java-library'
30-
id 'java-library-distribution'
3131
id 'org.springframework.boot'
3232
id 'io.spring.dependency-management'
3333
}

0 commit comments

Comments
 (0)