-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
121 lines (106 loc) · 3.29 KB
/
Copy pathbuild.gradle
File metadata and controls
121 lines (106 loc) · 3.29 KB
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
115
116
117
118
119
120
121
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
// Publish libs to e.g central.sonatype.org
id 'maven-publish'
// publish to central.sonatype.org via the Central Publisher Portal
// see: https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
alias(libs.plugins.jreleaser)
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
java {
toolchain {
// use java 25 to compile the project
languageVersion = JavaLanguageVersion.of(25)
}
}
compileJava {
// ensure output is compatible with java 17
options.release = 17
// log details of usage of deprecated members or classes.
options.deprecation = true
}
test {
useJUnitPlatform()
}
dependencies {
implementation libs.jopenlibs.vault
implementation libs.slf4j.api
// test dependencies
testImplementation libs.junit.jupiter
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation libs.assertj.core
testImplementation libs.slf4j.simple
}
java {
// create sources.jar as well
withSourcesJar()
// create javadoc.jar as well
withJavadocJar()
}
jar {
manifest.attributes provider: 'gradle'
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'de.otto'
artifactId = 'kafka-messaging-e2ee'
description = 'Kafka Messaging End-To-End-Encryption'
from components.java
pom {
name = 'Kafka Messaging E2EE'
description = 'Kafka Messaging End-To-End-Encryption'
url = 'https://github.com/otto-de/kafka-messaging-e2ee'
inceptionYear = '2024'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'andrekaplick5678'
name = 'Andre Kaplick'
organization = 'OTTO'
organizationUrl = 'https://www.github.com/otto-de'
}
}
scm {
connection = 'scm:git:git://github.com:otto-de/kafka-messaging-e2ee.git'
developerConnection = 'scm:git:ssh://github.com:otto-de/kafka-messaging-e2ee.git'
url = 'https://github.com/otto-de/kafka-messaging-e2ee/tree/main'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
jreleaser {
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('target/staging-deploy')
}
}
}
}
}
tasks.register("zipForUpload", Zip) {
dependsOn tasks.named('publish')
archiveFileName = 'central-bundle.zip'
from 'build/staging-deploy'
destinationDirectory = file('build/staging-deploy')
exclude '**/*.zip'
}