Skip to content

Conversation

@sibasispadhi
Copy link

Migrate examples/distro/build.gradle from Groovy to Kotlin DSL for improved consistency with the rest of the repository.

Most of the instrumentation repository (608 files) already uses Kotlin for Gradle build files. This migration converts one of the remaining Groovy files to match the established pattern.

Fixes #15794

@sibasispadhi sibasispadhi requested a review from a team as a code owner January 10, 2026 22:17
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 10, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@sibasispadhi sibasispadhi force-pushed the examples/convert-distro-to-kotlin branch from 4da64b3 to c15f82e Compare January 10, 2026 22:28
Copy link
Member

@jaydeluca jaydeluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a merge conflict that needs to be resolved, in case you didn't see

@sibasispadhi sibasispadhi force-pushed the examples/convert-distro-to-kotlin branch from 87c1813 to 960a046 Compare January 15, 2026 02:06
Convert the examples/distro/build.gradle to build.gradle.kts using
Kotlin DSL syntax. This improves type safety and IDE support while
maintaining all existing functionality.

Key changes:
- Rename build.gradle to build.gradle.kts
- Convert Groovy syntax to Kotlin DSL:
  - Use mapOf() instead of Groovy maps
  - Use apply(plugin = "name") instead of apply plugin: "name"
  - Use plugins.withType<JavaPlugin> for deferred configuration
  - Use tasks.named<Type>() for task configuration
- Update .github/scripts/update-sdk-version.sh to match new Kotlin
  DSL syntax ("opentelemetrySdk" to "version" format)
- Preserve extra["versions"] and extra["deps"] for use by Groovy
  subproject build files and applied scripts
- Set Java 8 release only for main source compilation (compileJava),
  allowing tests to use modern Java features

The conversion maintains equivalence to the original Groovy build
while following Gradle Kotlin DSL best practices.

Signed-off-by: Sibasis Padhi <[email protected]>
@sibasispadhi sibasispadhi force-pushed the examples/convert-distro-to-kotlin branch from 960a046 to f2b1f33 Compare January 16, 2026 02:27
@sibasispadhi sibasispadhi force-pushed the examples/convert-distro-to-kotlin branch from f2b1f33 to 61ce0fe Compare January 16, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert examples/distro Gradle build to Kotlin

3 participants