This repository has been archived by the owner on May 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
114 lines (100 loc) · 2.89 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
plugins {
id 'org.springframework.boot' version '2.4.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
id 'net.researchgate.release' version '2.8.1'
id 'com.github.ben-manes.versions' version '0.38.0'
id 'com.github.breadmoirai.github-release' version '2.2.12'
}
group = 'com.redislabs'
description = 'Spring RediSearch'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
mavenLocal()
}
bootJar {
enabled = false
}
jar {
enabled = true
}
dependencies {
implementation ('org.springframework.boot:spring-boot-starter') {
exclude group: 'io.lettuce', module: 'lettuce-core'
}
api 'com.redislabs:lettusearch:3.1.2'
api 'org.apache.commons:commons-pool2'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
test {
useJUnitPlatform()
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Spring RediSearch'
description = 'Spring configuration for LettuSearch'
url = 'https://github.com/RediSearch/spring-redisearch'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jruaux'
name = 'Julien Ruaux'
}
}
scm {
connection = 'scm:git:git://github.com/RediSearch/spring-redisearch.git'
developerConnection = 'scm:git:[email protected]:RediSearch/spring-redisearch.git'
url = 'https://github.com/RediSearch/spring-redisearch'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
nexusPublishing {
repositories {
sonatype()
}
}
githubRelease {
token = project.hasProperty('githubToken') ? project.property('githubToken') : ''
owner "RediSearch"
repo "spring-redisearch"
draft true
body changelog()
}
afterReleaseBuild.dependsOn ":githubRelease"
afterReleaseBuild.dependsOn ":publishToSonatype"
afterReleaseBuild.dependsOn ":closeAndReleaseSonatypeStagingRepository"