Skip to content

Commit 1048d36

Browse files
committed
chore: build-logic changes to better support java otel agent
1 parent 5e2d103 commit 1048d36

File tree

7 files changed

+81
-61
lines changed

7 files changed

+81
-61
lines changed

gradle/build-logic/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ val dslJavaVersion = libs.versions.kotlin.dsl.jvmtarget
2020
idea {
2121
module {
2222
isDownloadJavadoc = false
23-
isDownloadSources = true
23+
isDownloadSources = false
2424
}
2525
}
2626

gradle/build-logic/src/main/kotlin/common/Multiplatform.kt

+1-7
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ fun KotlinMultiplatformExtension.commonTarget(project: Project) =
4242
api(libs.kotlin.retry)
4343
api(libs.kotlin.logging)
4444
api(libs.kotlinx.html)
45-
api(libs.bundles.ajalt)
46-
api(libs.kotlinx.jsonpath)
47-
api(libs.kotlin.cryptography.core)
48-
api(libs.kotlin.cryptography.random)
49-
api(libs.kotlin.bignum)
50-
api(libs.kotlin.bignum.serialization)
5145
api(libs.ktor.client.core)
5246
api(libs.ktor.client.cio)
5347
api(libs.ktor.client.content.negotiation)
@@ -302,7 +296,7 @@ fun KotlinMultiplatformExtension.nativeTargets(
302296
if (isNativeTargetEnabled) {
303297
fun KotlinNativeTarget.configureAll() {
304298
compilerOptions {
305-
// freeCompilerArgs.addAll("-Xverbose-phases=Linker", "-Xruntime-logs=gc=info")
299+
// freeCompilerArgs.addAll()
306300
}
307301
configure()
308302
}

gradle/build-logic/src/main/kotlin/dev.suresh.plugin.kotlin.jvm.gradle.kts

+19-9
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ configurations.configureEach {
3838
}
3939

4040
java {
41-
withSourcesJar()
42-
withJavadocJar()
4341
toolchain { configureJvmToolchain(project) }
42+
// withSourcesJar()
43+
// withJavadocJar()
4444
}
4545

4646
kotlin {
@@ -196,9 +196,14 @@ tasks {
196196
pluginManager.withPlugin("com.google.cloud.tools.jib") {
197197
val copyOtelAgent by
198198
registering(Copy::class) {
199-
from(javaAgent)
199+
from(javaAgent) {
200+
eachFile {
201+
if (name.startsWith("opentelemetry-javaagent")) {
202+
name = "otel-javaagent.jar"
203+
}
204+
}
205+
}
200206
into(layout.buildDirectory.dir("otel"))
201-
rename { "otel-javaagent.jar" }
202207
duplicatesStrategy = DuplicatesStrategy.INCLUDE
203208
}
204209

@@ -207,20 +212,26 @@ tasks {
207212
// Docker command to run the image
208213
withType<BuildDockerTask>().configureEach {
209214
doLast {
210-
val portMapping = jib?.container?.ports.orEmpty().joinToString(" ") { "-p $it:$it" }
215+
val portMapping =
216+
jib?.container?.ports.orEmpty().joinToString(" \\\n ") { "-p $it:$it" }
211217
val image = jib?.to?.image ?: project.name
212218
val tag = jib?.to?.tags?.firstOrNull() ?: "latest"
213219
val env =
214220
jib?.container
215221
?.environment
216222
.orEmpty()
217223
.map { "-e ${it.key}=${it.value}" }
218-
.joinToString(" ")
224+
.joinToString(" \\\n ")
219225
logger.lifecycle(
220226
TextColors.cyan(
221227
"""
222-
|Run: docker run -it --rm --name ${project.name} $portMapping $env $image:$tag
223-
"""
228+
|Run: docker run \
229+
| -it --rm \
230+
| --name ${project.name} \
231+
| $portMapping \
232+
| $env \
233+
| $image:$tag
234+
"""
224235
.trimMargin()))
225236
}
226237
}
@@ -256,7 +267,6 @@ dependencies {
256267
implementation(libs.kotlin.redacted.annotations)
257268
implementation(libs.jspecify)
258269
implementation(libs.bundles.keystore)
259-
implementation(libs.bundles.ajalt)
260270
implementation(libs.slf4j.api)
261271
// implementation(libs.slf4j.jul)
262272

gradle/build-logic/src/main/kotlin/dev.suresh.plugin.root.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ tasks {
175175

176176
wrapper {
177177
gradleVersion = libs.versions.gradle.asProvider().get()
178-
distributionType = Wrapper.DistributionType.ALL
178+
distributionType = Wrapper.DistributionType.BIN
179179
// distributionUrl = "${Repo.GRADLE_DISTRO}/gradle-$gradleVersion-bin.zip"
180180
}
181181

gradle/kotlin-js-store/package-lock.json

+25-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradle/libs.versions.toml

+33-32
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ org-name = "suresh.dev"
2020
org-url = "https://suresh.dev"
2121

2222
# Dependency Versions
23-
bc-plugins = "1.36.0"
23+
bc-plugins = "1.38.0"
2424
kotlinx-kover = "0.9.1"
2525
kotlinx-bcv = "0.17.0"
2626
kotlin-dokka = "2.0.0"
@@ -30,45 +30,45 @@ kotlinx-coroutines = "1.10.2"
3030
kotlinx-datetime = "0.6.2"
3131
kotlinx-datetime-zoneinfo = "2025a-spi.0.6.2"
3232
kotlinx-serialization = "1.8.1"
33-
kotlinx-rpc = "0.6.2"
34-
kotlinx-collections-immutable = "0.3.8"
33+
kotlinx-rpc = "0.7.0"
34+
kotlinx-collections-immutable = "0.4.0"
3535
kotlinx-lincheck = "2.39"
3636
kotlinx-html = "0.12.0"
3737
kotlinx-browser = "0.3"
38-
kotlinx-benchmark = "0.4.13"
38+
kotlinx-benchmark = "0.4.14"
3939
kotlinx-fuzz = "0.2.2"
4040
kotlinx-metadata = "0.9.0"
4141
kotlinx-reflect-lite = "1.1.0"
42-
kotlin-wrappers = "2025.5.3"
42+
kotlin-wrappers = "2025.5.8"
4343
kotlin-redacted = "1.14.0-alpha01"
4444
kotlin-serviceloader = "0.0.15"
4545
kotlinx-multik = "0.2.3"
46-
kotlinx-dataframe = "1.0.0-dev-6948"
46+
kotlinx-dataframe = "1.0.0-Beta1"
4747
kotlinx-kandy = "0.8.0"
4848
kotlin-statistics = "0.4.0-RC1"
49-
gradle-kotlin-dsl = "6.1.1"
50-
exoquery-plugin = "2.1.20-1.2.1.PL"
51-
exoquery-sql = "1.2.1.PL-1.2.1"
52-
exposed = "0.61.0"
49+
gradle-kotlin-dsl = "6.1.2"
50+
exoquery-plugin = "2.1.20-1.2.3.PL"
51+
exoquery-sql = "1.2.3.PL-1.2.3"
52+
exposed = "1.0.0-beta-1"
5353
postgresql = "42.7.5"
5454
embedded-postgres = "2.1.0"
55-
embedded-postgres-bom = "17.2.0"
56-
evas = "1.2.0"
55+
embedded-postgres-bom = "17.4.0"
56+
evas = "1.3.0"
5757
kopy = "0.15.0+2.1.20"
5858
poko = "0.18.6"
5959
mappie = "2.1.20-1.2.3"
6060
akkurate = "0.11.0"
61-
kaml = "0.77.1"
61+
kaml = "0.78.0"
6262
snakeyaml-engine-kmp = "3.1.1"
6363
konsist = "0.17.3"
64-
decoroutinator = "2.4.9"
64+
decoroutinator = "2.5.0"
6565
spring-boot = "3.4.5"
6666
spring-depmgmt = "1.1.7"
6767
ktor = "3.1.3"
68-
ktor-cohort = "2.7.0"
68+
ktor-cohort = "2.7.1"
6969
fusionauth-http = "0.4.0-RC.4"
70-
otel = "1.49.0"
71-
otel-alpha = "1.49.0-alpha"
70+
otel = "1.50.0"
71+
otel-alpha = "1.50.0-alpha"
7272
otel-instr = "2.15.0"
7373
otel-instr-alpha = "2.15.0-alpha"
7474
otel-semconv = "1.32.0"
@@ -80,7 +80,7 @@ zip-prefixer = "0.3.1"
8080
ajalt-mordant = "3.0.2"
8181
ajalt-clikt = "5.0.3"
8282
ajalt-colormath = "3.6.1"
83-
jline = "3.29.0"
83+
jline = "3.30.1"
8484
classgraph = "4.8.179"
8585
cache4k = "0.14.0"
8686
intellij-coverage = "1.0.766"
@@ -89,17 +89,17 @@ jgit = "7.2.0.202503040940-r"
8989
jte = "3.2.1"
9090
jimfs = "1.3.0"
9191
sshj = "0.39.0"
92-
jsch = "0.2.26"
92+
jsch = "2.27.0"
9393
pty4j = "0.13.4"
9494
oshi = "6.8.1"
9595
junit = "5.13.0-M3"
96-
koin = "4.1.0-Beta8"
96+
koin = "4.1.0-Beta11"
9797
koin-annotations = "2.0.1-RC1"
98-
metro = "0.3.0"
98+
metro = "0.3.2"
9999
kotest = "6.0.0.M4"
100100
mockk = "1.14.2"
101101
mokkery = "2.7.2"
102-
wiremock = "4.0.0-beta.2"
102+
wiremock = "4.0.0-beta.6"
103103
wiremock-kotlin = "2.1.1"
104104
okhttp = "5.0.0-alpha.14"
105105
slf4j = "2.1.0-alpha1"
@@ -110,7 +110,7 @@ jmh = "1.37"
110110
mrjar = "0.1.1"
111111
ktfmt = "0.54"
112112
google-javaformat = "1.27.0"
113-
palantir-javaformat = "2.64.0"
113+
palantir-javaformat = "2.67.0"
114114
google-auto-service = "1.1.1"
115115
google-tink = "1.17.0"
116116
graalvm = "24.2.1"
@@ -181,9 +181,10 @@ okapibarcode = "0.5.0"
181181
chasm = "0.9.66"
182182
cel = "0.9.1"
183183
kfswatch = "1.3.0"
184-
kmp-process = "0.2.0"
184+
kmp-process = "0.2.1"
185185
kmbed = "1.8.4"
186-
langchain4j = "1.0.0-rc1"
186+
langchain4j = "1.0.0"
187+
langchain4j-kotlin = "0.1.12"
187188
jlama = "0.8.4"
188189
mcp-kotlin = "0.5.1"
189190
mcp4k = "0.4.0"
@@ -205,12 +206,12 @@ jetbrains-compose-icons = "1.7.3"
205206
kobweb = "0.21.1"
206207
detekt = "1.23.8"
207208
detekt-compose-rules = "0.4.22"
208-
compose-hotreload = "1.0.0-alpha09"
209+
compose-hotreload = "1.0.0-alpha10"
209210
compose-icons = "1.1.1"
210211
compose-routing = "0.4.0"
211212
kottie = "2.0.1"
212213
mosaic = "0.17.0"
213-
filekit-dialogs = "0.10.0-beta03"
214+
filekit-dialogs = "0.10.0-beta04"
214215

215216
# NPM Dependencies
216217
npm-highlightjs = "11.11.0"
@@ -224,9 +225,9 @@ swagger-style = "https://unpkg.com/[email protected]/them
224225
benmanes = "0.52.0"
225226
foojay-resolver = "0.10.0"
226227
gradle-develocity = "4.0.1"
227-
nmcp = "0.1.3"
228+
nmcp = "0.1.4"
228229
nexus-publish = "2.0.0"
229-
vanniktech-publish = "0.31.0"
230+
vanniktech-publish = "0.32.0"
230231
gradle-publish = "1.3.1"
231232
shadow = "9.0.0-beta13"
232233
spotless = "7.0.3"
@@ -260,7 +261,7 @@ jlink-jib = "0.4.1"
260261
maven-plugin-api = "3.9.9"
261262
maven-plugin-annotations = "3.15.1"
262263
gradlex-maven-plugin = "1.0.3"
263-
typesafe-conventions = "0.7.0"
264+
typesafe-conventions = "0.7.1"
264265

265266
# Repositories
266267
repo-mvn-central = "https://repo.maven.apache.org/maven2/"
@@ -650,7 +651,9 @@ weh-chicory-emscripten = { module = "at.released.weh:bindings-chic
650651

651652
# AI/ML
652653
langchain4j = { module = "dev.langchain4j:langchain4j" , version.ref = "langchain4j" }
654+
langchain4j-bom = { module = "dev.langchain4j:langchain4j-bom" , version.ref = "langchain4j" }
653655
langchain4j-jlama = { module = "dev.langchain4j:langchain4j-jlama" , version.ref = "langchain4j" }
656+
langchain4j-kotlin = { module = "me.kpavlov.langchain4j.kotlin:langchain4j-kotlin" , version.ref = "langchain4j-kotlin" }
654657
jlama-core = { module = "com.github.tjake:jlama-core" , version.ref = "jlama" }
655658
jlama-native = { module = "com.github.tjake:jlama-native" , version.ref = "jlama" }
656659
dflib = { module = "org.dflib:dflib" , version.ref = "dflib" }
@@ -681,8 +684,6 @@ dataviz = ["kotlinx-dataframe-csv",
681684
json-extra = ["kotlinx-jsonpath","json-schema-validator"]
682685
keystore = ["sslcontext-kickstart","directory-keystore"]
683686
otel = ["otel-instr-annotations",
684-
"otel-sdk-autoconf",
685-
"otel-sdk-extn",
686687
"otel-semconv",
687688
"otel-instr-ktor",
688689
"otel-instr-logback-mdc",

0 commit comments

Comments
 (0)