|
1 | 1 | import com.google.protobuf.gradle.id |
2 | 2 |
|
3 | 3 | plugins { |
4 | | - application |
5 | | - jacoco |
| 4 | + application |
| 5 | + jacoco |
6 | 6 |
|
7 | | - id("com.google.protobuf") version "0.9.4" |
8 | | - id("org.pkl-lang") version "0.29.0" |
| 7 | + id("com.google.protobuf") version "0.9.4" |
| 8 | + id("org.pkl-lang") version "0.29.0" |
9 | 9 |
|
10 | | - kotlin("jvm") |
| 10 | + kotlin("jvm") |
11 | 11 | } |
12 | 12 |
|
13 | 13 | group = "ac.at.uibk.dps.cirrina" |
14 | 14 | version = rootProject.file("version.txt").readText().trim() |
15 | 15 |
|
16 | 16 | application { |
17 | | - mainClass = "at.ac.uibk.dps.cirrina.cirrina.Cirrina" |
| 17 | + mainClass = "at.ac.uibk.dps.cirrina.cirrina.CirrinaKt" |
18 | 18 | } |
19 | 19 |
|
20 | 20 | java { |
21 | | - toolchain { |
22 | | - languageVersion = JavaLanguageVersion.of(21) |
23 | | - } |
| 21 | + toolchain { |
| 22 | + languageVersion = JavaLanguageVersion.of(21) |
| 23 | + } |
24 | 24 | } |
25 | 25 |
|
26 | 26 | jacoco { |
27 | | - toolVersion = "0.8.11" |
| 27 | + toolVersion = "0.8.11" |
28 | 28 | } |
29 | 29 |
|
30 | 30 | pkl { |
31 | | - project { |
32 | | - packagers { |
33 | | - register("pklMakePackages") { |
34 | | - projectDirectories.from(file("src/main/resources/pkl/csm/")) |
35 | | - outputPath.set(File("build/generated/pkl/packages/csm")) |
36 | | - } |
37 | | - } |
| 31 | + project { |
| 32 | + packagers { |
| 33 | + register("pklMakePackages") { |
| 34 | + projectDirectories.from(file("src/main/resources/pkl/csm/")) |
| 35 | + outputPath.set(File("build/generated/pkl/packages/csm")) |
| 36 | + } |
38 | 37 | } |
39 | | - javaCodeGenerators { |
40 | | - register("pklGenJava") { |
41 | | - sourceModules.addAll( |
42 | | - "src/main/resources/pkl/csm/Csml.pkl", |
43 | | - "src/main/resources/pkl/csm/HttpServiceImplementationDescription.pkl", |
44 | | - "src/main/resources/pkl/csm/ServiceImplementationDescription.pkl" |
45 | | - ) |
46 | | - generateGetters.set(true) |
47 | | - generateJavadoc.set(true) |
48 | | - } |
| 38 | + } |
| 39 | + javaCodeGenerators { |
| 40 | + register("pklGenJava") { |
| 41 | + sourceModules.addAll( |
| 42 | + "src/main/resources/pkl/csm/Csml.pkl", |
| 43 | + "src/main/resources/pkl/csm/HttpServiceImplementationDescription.pkl", |
| 44 | + "src/main/resources/pkl/csm/ServiceImplementationDescription.pkl" |
| 45 | + ) |
| 46 | + generateGetters.set(true) |
| 47 | + generateJavadoc.set(true) |
49 | 48 | } |
| 49 | + } |
50 | 50 | } |
51 | 51 |
|
52 | 52 | protobuf { |
53 | | - generateProtoTasks { |
54 | | - all().forEach { task -> |
55 | | - task.builtins { |
56 | | - id("python") |
57 | | - id("cpp") |
58 | | - } |
59 | | - } |
| 53 | + generateProtoTasks { |
| 54 | + all().forEach { task -> |
| 55 | + task.builtins { |
| 56 | + id("python") |
| 57 | + id("cpp") |
| 58 | + } |
60 | 59 | } |
| 60 | + } |
61 | 61 | } |
62 | 62 |
|
63 | 63 | dependencies { |
64 | | - implementation("com.ecwid.consul:consul-api:1.4.5") |
| 64 | + implementation("com.ecwid.consul:consul-api:1.4.5") |
65 | 65 |
|
66 | | - implementation("com.fasterxml.jackson.core:jackson-databind:2.15.1") |
67 | | - implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.15.1") |
68 | | - implementation("com.fasterxml.jackson.module:jackson-module-jsonSchema:2.15.1") |
69 | | - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.1") |
70 | | - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.1") |
| 66 | + implementation("com.fasterxml.jackson.core:jackson-databind:2.15.1") |
| 67 | + implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.15.1") |
| 68 | + implementation("com.fasterxml.jackson.module:jackson-module-jsonSchema:2.15.1") |
| 69 | + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.1") |
| 70 | + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.1") |
71 | 71 |
|
72 | | - implementation("com.google.guava:guava:33.0.0-jre") |
| 72 | + implementation("com.google.guava:guava:33.0.0-jre") |
73 | 73 |
|
74 | | - implementation("com.google.protobuf:protobuf-java:4.32.0") |
| 74 | + implementation("com.google.protobuf:protobuf-java:4.32.0") |
75 | 75 |
|
76 | | - implementation("info.schnatterer.moby-names-generator:moby-names-generator:20.10.1-r0") |
| 76 | + implementation("io.nats:jnats:2.17.3") |
77 | 77 |
|
78 | | - implementation("io.nats:jnats:2.17.3") |
| 78 | + implementation(platform("io.opentelemetry:opentelemetry-bom:1.38.0")); |
| 79 | + implementation("io.opentelemetry:opentelemetry-api"); |
| 80 | + implementation("io.opentelemetry:opentelemetry-sdk"); |
| 81 | + implementation("io.opentelemetry:opentelemetry-exporter-logging"); |
| 82 | + implementation("io.opentelemetry:opentelemetry-exporter-otlp"); |
| 83 | + implementation("io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha"); |
| 84 | + implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure"); |
79 | 85 |
|
80 | | - implementation(platform("io.opentelemetry:opentelemetry-bom:1.38.0")); |
81 | | - implementation("io.opentelemetry:opentelemetry-api"); |
82 | | - implementation("io.opentelemetry:opentelemetry-sdk"); |
83 | | - implementation("io.opentelemetry:opentelemetry-exporter-logging"); |
84 | | - implementation("io.opentelemetry:opentelemetry-exporter-otlp"); |
85 | | - implementation("io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha"); |
86 | | - implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure"); |
| 86 | + implementation("jakarta.annotation:jakarta.annotation-api:3.0.0") |
87 | 87 |
|
88 | | - implementation("jakarta.annotation:jakarta.annotation-api:3.0.0") |
| 88 | + implementation("org.apache.commons:commons-jexl3:3.3") |
89 | 89 |
|
90 | | - implementation("org.apache.commons:commons-jexl3:3.3") |
| 90 | + implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1") |
91 | 91 |
|
92 | | - implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1") |
| 92 | + implementation("org.apache.logging.log4j:log4j-core:2.23.1") |
93 | 93 |
|
94 | | - implementation("org.apache.logging.log4j:log4j-core:2.23.1") |
| 94 | + implementation("org.glassfish.expressly:expressly:5.0.0") |
95 | 95 |
|
96 | | - implementation("org.glassfish.expressly:expressly:5.0.0") |
| 96 | + implementation("org.hibernate.validator:hibernate-validator:8.0.1.Final") |
| 97 | + implementation("org.hibernate:hibernate-validator-cdi:8.0.1.Final") |
97 | 98 |
|
98 | | - implementation("org.hibernate.validator:hibernate-validator:8.0.1.Final") |
99 | | - implementation("org.hibernate:hibernate-validator-cdi:8.0.1.Final") |
| 99 | + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0") |
100 | 100 |
|
101 | | - implementation("org.jgrapht:jgrapht-core:1.5.2") |
| 101 | + implementation("org.jgrapht:jgrapht-core:1.5.2") |
102 | 102 |
|
103 | | - implementation("org.pkl-lang:pkl-config-java:0.29.0") |
104 | | - implementation("org.pkl-lang:pkl-codegen-java:0.29.0") |
| 103 | + implementation("org.pkl-lang:pkl-config-java:0.29.0") |
| 104 | + implementation("org.pkl-lang:pkl-codegen-java:0.29.0") |
105 | 105 |
|
106 | | - testImplementation(platform("org.junit:junit-bom:5.9.1")) |
107 | | - testImplementation("org.junit.jupiter:junit-jupiter") |
| 106 | + testImplementation(platform("org.junit:junit-bom:5.9.1")) |
| 107 | + testImplementation("org.junit.jupiter:junit-jupiter") |
108 | 108 |
|
109 | | - testImplementation("org.mockito:mockito-core:5.11.0") |
110 | | - implementation(kotlin("stdlib-jdk8")) |
| 109 | + testImplementation("org.mockito:mockito-core:5.11.0") |
| 110 | + implementation(kotlin("stdlib-jdk8")) |
111 | 111 | } |
112 | 112 |
|
113 | 113 | repositories { |
114 | | - mavenCentral() |
115 | | - gradlePluginPortal() |
116 | | - maven(url = "https://repository.cloudera.com/artifactory/cloudera-repos/") |
| 114 | + mavenCentral() |
| 115 | + gradlePluginPortal() |
| 116 | + maven(url = "https://repository.cloudera.com/artifactory/cloudera-repos/") |
117 | 117 | } |
118 | 118 |
|
119 | 119 | tasks.compileJava { |
120 | | - dependsOn("pklMakePackages") |
| 120 | + dependsOn("pklMakePackages") |
121 | 121 | } |
122 | 122 |
|
123 | 123 | tasks.distZip { |
124 | | - archiveFileName.set("${project.name}.zip") |
| 124 | + archiveFileName.set("${project.name}.zip") |
125 | 125 | } |
126 | 126 |
|
127 | 127 | tasks.test { |
128 | | - useJUnitPlatform() |
129 | | - finalizedBy(tasks.jacocoTestReport) |
| 128 | + useJUnitPlatform() |
| 129 | + finalizedBy(tasks.jacocoTestReport) |
130 | 130 | } |
131 | 131 |
|
132 | 132 | tasks.jacocoTestReport { |
133 | | - dependsOn(tasks.test) |
134 | | - reports { |
135 | | - xml.required = true |
136 | | - html.required = false |
137 | | - csv.required = false |
138 | | - } |
| 133 | + dependsOn(tasks.test) |
| 134 | + reports { |
| 135 | + xml.required = true |
| 136 | + html.required = false |
| 137 | + csv.required = false |
| 138 | + } |
139 | 139 | } |
140 | 140 |
|
141 | 141 | tasks.withType<Jar> { |
142 | | - manifest { |
143 | | - attributes["Main-Class"] = "at.ac.uibk.dps.cirrina.main.Main" |
144 | | - attributes["Implementation-Version"] = version |
145 | | - } |
| 142 | + manifest { |
| 143 | + attributes["Main-Class"] = "at.ac.uibk.dps.cirrina.main.Main" |
| 144 | + attributes["Implementation-Version"] = version |
| 145 | + } |
146 | 146 | } |
0 commit comments