Skip to content

Commit 2f457a2

Browse files
committed
using jreleaser for releasing to github
1 parent badef4d commit 2f457a2

File tree

3 files changed

+56
-61
lines changed

3 files changed

+56
-61
lines changed

README.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= Testcontainers Redis
2+
:linkattrs:
3+
:project-owner: redis-developer
4+
:project-name: testcontainers-redis
5+
:project-group: com.redislabs
6+
:project-version: 1.1.4-SNAPSHOT
7+
8+
image:https://img.shields.io/github/workflow/status/{project-owner}/{project-name}/EarlyAccess?logo=github["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"]
9+
image:https://img.shields.io/maven-central/v/{project-group}/{project-name}.svg[Download, link="https://search.maven.org/#search|ga|1|{project-name}"]
10+
image:https://img.shields.io/github/downloads/{project-owner}/{project-name}/total[GitHub all releases]
11+
12+
---
13+
14+
Testcontainers Redis is an extension of Testcontainers that supports Redis, Redis Modules, and Redis Enterprise.

build.gradle

Lines changed: 42 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ plugins {
33
id 'java-library'
44
id 'maven-publish'
55
id 'signing'
6-
id 'com.github.johnrengelman.shadow' version '7.0.0'
6+
id 'java-library-distribution'
7+
id 'org.springframework.boot' version '2.5.0'
8+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
79
id 'io.freefair.lombok' version '6.0.0-m2'
8-
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
9-
id 'net.researchgate.release' version '2.8.1'
1010
id 'com.github.ben-manes.versions' version '0.39.0'
11-
id 'com.github.breadmoirai.github-release' version '2.2.12'
11+
id 'com.github.johnrengelman.shadow' version '7.0.0'
12+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
13+
id 'org.jreleaser' version '0.4.0'
1214
}
1315

1416
group = 'com.redislabs'
@@ -27,15 +29,23 @@ repositories {
2729
}
2830

2931
dependencies {
30-
implementation group: 'org.testcontainers', name: 'testcontainers', version: testcontainers_version
31-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
32-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
33-
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.2'
34-
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: testcontainers_version
35-
testImplementation 'org.slf4j:slf4j-simple:1.7.30'
32+
implementation 'org.testcontainers:testcontainers:1.15.3-REDISLABS'
33+
testImplementation 'org.testcontainers:junit-jupiter:1.15.3-REDISLABS'
34+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
35+
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
36+
testImplementation 'org.junit.jupiter:junit-jupiter-params'
37+
testImplementation 'org.slf4j:slf4j-simple'
3638
testImplementation 'com.redislabs:mesclun:1.3.3-SNAPSHOT'
3739
}
3840

41+
bootJar {
42+
enabled = false
43+
}
44+
45+
jar {
46+
enabled = true
47+
}
48+
3949
shadowJar {
4050
archiveClassifier.set('')
4151
dependencies {
@@ -63,39 +73,6 @@ publishing {
6373
shadow(MavenPublication) { publication ->
6474
project.shadow.component(publication)
6575
}
66-
// mavenJava(MavenPublication) {
67-
// from(components.java)
68-
// versionMapping {
69-
// usage('java-api') {
70-
// fromResolutionOf('runtimeClasspath')
71-
// }
72-
// usage('java-runtime') {
73-
// fromResolutionResult()
74-
// }
75-
// }
76-
// pom {
77-
// name = 'Testcontainers Redis'
78-
// description = 'Redis modules for Testcontainers'
79-
// url = 'https://github.com/redis-developer/testcontainers-redis'
80-
// licenses {
81-
// license {
82-
// name = 'The Apache License, Version 2.0'
83-
// url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
84-
// }
85-
// }
86-
// developers {
87-
// developer {
88-
// id = 'jruaux'
89-
// name = 'Julien Ruaux'
90-
// }
91-
// }
92-
// scm {
93-
// connection = 'scm:git:git://github.com/redis-developer/testcontainers-redis'
94-
// developerConnection = 'scm:git:git@github.com:redis-developer/testcontainers-redis'
95-
// url = 'https://github.com/redis-developer/testcontainers-redis'
96-
// }
97-
// }
98-
// }
9976
}
10077
}
10178

@@ -107,20 +84,6 @@ tasks.withType(Sign) {
10784
onlyIf { isReleaseVersion }
10885
}
10986

110-
nexusPublishing {
111-
repositories {
112-
sonatype()
113-
}
114-
}
115-
116-
githubRelease {
117-
token = project.hasProperty('githubToken') ? project.property('githubToken') : ''
118-
owner "redis-developer"
119-
repo "testcontainers-redis"
120-
body changelog()
121-
tagName "${project.version}"
122-
}
123-
12487
def isNonStable = { String version ->
12588
def nonStableKeyword = ['PREVIEW'].any { it -> version.toUpperCase().contains(it) }
12689
def stableKeyword = ['RELEASE', 'FINAL', 'GA', 'JRE8'].any { it -> version.toUpperCase().contains(it) }
@@ -129,13 +92,32 @@ def isNonStable = { String version ->
12992
}
13093

13194
tasks.named("dependencyUpdates").configure {
132-
13395
rejectVersionIf {
13496
isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)
13597
}
98+
}
13699

100+
nexusPublishing {
101+
repositories {
102+
sonatype()
103+
}
137104
}
138105

139-
release {
140-
buildTasks = ['clean', 'build', 'publishToSonatype', 'closeAndReleaseSonatypeStagingRepository', 'githubRelease', 'publishToMavenLocal']
106+
jreleaser {
107+
project {
108+
name = 'testcontainers-redis'
109+
description = 'Testcontainers Redis'
110+
longDescription = 'Testcontainers extension for Redis, Redis Modules, and Redis Enterprise'
111+
website = 'https://github.com/redis-developer/testcontainers-redis'
112+
authors = ['Julien Ruaux']
113+
tags = ['redis', 'testcontainers']
114+
license = 'Apache-2.0'
115+
}
116+
release {
117+
github {
118+
username = 'jruaux'
119+
owner = 'redis-developer'
120+
overwrite = true
121+
}
122+
}
141123
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
version=1.1.4-SNAPSHOT
2-
testcontainers_version=1.15.3-REDISLABS

0 commit comments

Comments
 (0)