11plugins {
2- id ' org.springframework.boot' version ' 2.4.3 '
2+ id ' org.springframework.boot' version ' 2.4.4 '
33 id ' io.spring.dependency-management' version ' 1.0.11.RELEASE'
4- id ' java'
5- id ' distribution'
6- id ' java-library'
7- id ' java-library-distribution'
4+ id ' java-library'
85 id ' maven-publish'
6+ id ' signing'
7+ id ' io.github.gradle-nexus.publish-plugin' version ' 1.0.0'
98 id ' net.researchgate.release' version ' 2.8.1'
109 id ' com.github.ben-manes.versions' version ' 0.38.0'
1110 id ' com.github.breadmoirai.github-release' version ' 2.2.12'
12- id ' com.jfrog.bintray' version ' 1.8.5'
1311}
1412
1513group = ' com.redislabs'
2321}
2422
2523repositories {
26- jcenter()
2724 mavenCentral()
2825 mavenLocal()
2926}
@@ -40,7 +37,7 @@ dependencies {
4037 implementation (' org.springframework.boot:spring-boot-starter' ) {
4138 exclude group : ' io.lettuce' , module : ' lettuce-core'
4239 }
43- api ' com.redislabs:lettusearch:3.0.1 '
40+ api ' com.redislabs:lettusearch:3.1.2 '
4441 api ' org.apache.commons:commons-pool2'
4542 compileOnly ' org.projectlombok:lombok'
4643 annotationProcessor ' org.projectlombok:lombok'
@@ -50,21 +47,7 @@ test {
5047 useJUnitPlatform()
5148}
5249
53- distributions {
54- main {
55- contents {
56- from (project. docsDir) {
57- into ' docs'
58- }
59- from ' README.md'
60- from ' LICENSE'
61- }
62- }
63- }
64-
65- distTar {
66- compression = Compression . GZIP
67- }
50+ ext. isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
6851
6952publishing {
7053 publications {
@@ -104,37 +87,28 @@ publishing {
10487 }
10588}
10689
90+ signing {
91+ sign publishing. publications. mavenJava
92+ }
93+
94+ tasks. withType(Sign ) {
95+ onlyIf { isReleaseVersion }
96+ }
97+
98+ nexusPublishing {
99+ repositories {
100+ sonatype()
101+ }
102+ }
103+
107104githubRelease {
108105 token = project. hasProperty(' githubToken' ) ? project. property(' githubToken' ) : ' '
109106 owner " RediSearch"
110107 repo " spring-redisearch"
111- releaseAssets distZip, distTar
112108 draft true
113109 body changelog()
114110}
115111
116- bintray {
117- user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : ' '
118- key = project. hasProperty(' bintrayKey' ) ? project. property(' bintrayKey' ) : ' '
119- publications = [' mavenJava' ]
120- publish = true
121- pkg {
122- repo = ' maven'
123- name = project. name
124- licenses = [' Apache-2.0' ]
125- vcsUrl = ' https://github.com/RediSearch/spring-redisearch.git'
126- version {
127- gpg {
128- sign = true
129- }
130- mavenCentralSync {
131- sync = true
132- user = project. hasProperty(' ossrhUsername' ) ? project. property(' ossrhUsername' ) : ' '
133- password = project. hasProperty(' ossrhPassword' ) ? project. property(' ossrhPassword' ) : ' '
134- }
135- }
136- }
137- }
138-
139- bintrayUpload. dependsOn " :githubRelease"
140- afterReleaseBuild. dependsOn bintrayUpload
112+ afterReleaseBuild. dependsOn " :githubRelease"
113+ afterReleaseBuild. dependsOn " :publishToSonatype"
114+ afterReleaseBuild. dependsOn " :closeAndReleaseSonatypeStagingRepository"
0 commit comments