-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (54 loc) · 1.49 KB
/
build.gradle.kts
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
import java.time.LocalDate
import java.time.format.DateTimeFormatter
plugins {
`java-library`
`publishing`
`maven-publish`
id("com.jfrog.bintray") version "1.8.3"
}
group = "de.classyfi.libs"
version = "0.7.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
jcenter()
}
dependencies {
implementation(platform("org.springframework.session:spring-session-bom:Dragonfruit-SR1"))
implementation("org.springframework.session:spring-session-core")
implementation("org.springframework.session:spring-session-data-redis")
}
tasks.register<Jar>("sourcesJar") {
from(sourceSets.main.get().allJava)
archiveClassifier.set("sources")
}
publishing {
val mavenJava by publications.creating(MavenPublication::class) {
from(components["java"])
artifact(tasks["sourcesJar"])
}
}
val isSnapshot = project.version.toString().endsWith("-SNAPSHOT")
if (isSnapshot) {
version = "${project.version.toString().removeSuffix("-SNAPSHOT")}-${LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
}
val bintray_user: String? by project
val bintray_apikey: String? by project
bintray {
user = bintray_user
key = bintray_apikey
setPublications("mavenJava")
with (pkg) {
repo = "releases"
name = rootProject.name
userOrg = "markt-de"
setLicenses("Apache-2.0")
vcsUrl = "https://github.com/markt-de/spring-session-sticky"
version.name = project.version.toString()
if (isSnapshot) {
repo = "snapshots"
override = true
}
}
}