|
1 | 1 | plugins {
|
2 |
| - id("java-library") |
| 2 | + java |
3 | 3 | id("com.github.hierynomus.license")
|
4 | 4 | id("com.github.sgtsilvio.gradle.utf8")
|
5 |
| - id("com.github.sgtsilvio.gradle.metadata") |
6 |
| - id("com.github.sgtsilvio.gradle.javadoc-links") |
7 | 5 | }
|
8 | 6 |
|
9 |
| -/* ******************** metadata ******************** */ |
10 |
| - |
11 |
| -group = "com.hivemq" |
| 7 | +group = "com.hivemq.extensions.kafka.customizations" |
12 | 8 | description = "Hello World Customization for the HiveMQ Enterprise Extensions for Kafka"
|
13 | 9 |
|
14 |
| -metadata { |
15 |
| - readableName = "HiveMQ Kafka Extension Customization SDK" |
16 |
| - organization { |
17 |
| - name = "HiveMQ GmbH" |
18 |
| - url = "https://www.hivemq.com/" |
19 |
| - } |
20 |
| - license { |
21 |
| - apache2() |
22 |
| - } |
23 |
| - developers { |
24 |
| - developer { |
25 |
| - id = "cschaebe" |
26 |
| - name = "Christoph Schaebel" |
27 |
| - email = "christoph.schaebel@hivemq.com" |
28 |
| - } |
29 |
| - developer { |
30 |
| - id = "lbrandl" |
31 |
| - name = "Lukas Brandl" |
32 |
| - email = "lukas.brandl@hivemq.com" |
33 |
| - } |
34 |
| - developer { |
35 |
| - id = "flimpoeck" |
36 |
| - name = "Florian Limpoeck" |
37 |
| - email = "florian.limpoeck@hivemq.com" |
38 |
| - } |
39 |
| - developer { |
40 |
| - id = "sauroter" |
41 |
| - name = "Georg Held" |
42 |
| - email = "georg.held@hivemq.com" |
43 |
| - } |
44 |
| - developer { |
45 |
| - id = "SgtSilvio" |
46 |
| - name = "Silvio Giebl" |
47 |
| - email = "silvio.giebl@hivemq.com" |
48 |
| - } |
49 |
| - } |
50 |
| - github { |
51 |
| - org = "hivemq" |
52 |
| - repo = "hivemq-kafka-hello-world-customization" |
53 |
| - issues() |
| 10 | +java { |
| 11 | + toolchain { |
| 12 | + languageVersion.set(JavaLanguageVersion.of(11)) |
54 | 13 | }
|
55 | 14 | }
|
56 | 15 |
|
57 |
| -/* ******************** dependencies ******************** */ |
58 |
| - |
59 | 16 | repositories {
|
60 | 17 | mavenCentral()
|
61 | 18 | }
|
62 | 19 |
|
63 | 20 | dependencies {
|
64 |
| - api("com.hivemq:hivemq-kafka-extension-customization-sdk:${property("hivemq-kakfa-sdk.version")}") |
65 |
| - api("org.slf4j:slf4j-api:${property("slf4j.version")}") |
| 21 | + implementation("com.hivemq:hivemq-kafka-extension-customization-sdk:${property("hivemq-kafka-sdk.version")}") |
66 | 22 | }
|
67 | 23 |
|
68 | 24 | dependencies {
|
69 |
| - testImplementation("org.junit.jupiter:junit-jupiter-api:${property("junit.jupiter.version")}") |
70 |
| - testImplementation("org.junit.jupiter:junit-jupiter-params:${property("junit.jupiter.version")}") |
| 25 | + testImplementation("org.junit.jupiter:junit-jupiter-api:${property("junit-jupiter.version")}") |
| 26 | + testImplementation("org.junit.jupiter:junit-jupiter-params") |
| 27 | + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") |
71 | 28 | testImplementation("org.mockito:mockito-core:${property("mockito.version")}")
|
72 |
| - testRuntimeOnly("org.mockito:mockito-junit-jupiter:${property("mockito.version")}") |
73 |
| - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${property("junit.jupiter.version")}") |
74 | 29 | testRuntimeOnly("org.slf4j:slf4j-simple:${property("slf4j-simple.version")}")
|
75 | 30 | }
|
76 | 31 |
|
77 | 32 | tasks.test {
|
78 | 33 | useJUnitPlatform()
|
79 | 34 | }
|
80 | 35 |
|
81 |
| -/* ******************** java ******************** */ |
82 |
| - |
83 |
| -java { |
84 |
| - sourceCompatibility = JavaVersion.VERSION_11 |
85 |
| - targetCompatibility = JavaVersion.VERSION_11 |
86 |
| - |
87 |
| - withJavadocJar() |
88 |
| - withSourcesJar() |
89 |
| -} |
90 |
| - |
91 |
| -tasks.withType<Jar>().configureEach { |
| 36 | +tasks.withType<Jar> { |
92 | 37 | manifest.attributes(
|
93 | 38 | "Implementation-Title" to project.name,
|
94 |
| - "Implementation-Vendor" to metadata.organization.name, |
| 39 | + "Implementation-Vendor" to "HiveMQ GmbH", |
95 | 40 | "Implementation-Version" to project.version)
|
96 | 41 | }
|
97 | 42 |
|
98 |
| -tasks.javadoc { |
99 |
| - title = "${metadata.readableName} ${project.version} API" |
100 |
| - isFailOnError = false |
101 |
| -} |
102 |
| - |
103 |
| -/* ******************** checks ******************** */ |
104 |
| - |
105 | 43 | license {
|
106 |
| - header = file("${projectDir}/HEADER") |
| 44 | + header = rootDir.resolve("HEADER") |
107 | 45 | mapping("java", "SLASHSTAR_STYLE")
|
108 | 46 | }
|
0 commit comments