-
Notifications
You must be signed in to change notification settings - Fork 1k
Convert examples/distro Gradle build to Kotlin #15831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sibasispadhi
wants to merge
2
commits into
open-telemetry:main
Choose a base branch
from
sibasispadhi:examples/convert-distro-to-kotlin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Convert examples/distro Gradle build to Kotlin #15831
sibasispadhi
wants to merge
2
commits into
open-telemetry:main
from
sibasispadhi:examples/convert-distro-to-kotlin
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4da64b3 to
c15f82e
Compare
SylvainJuge
reviewed
Jan 12, 2026
jaydeluca
reviewed
Jan 14, 2026
Member
jaydeluca
left a comment
There was a problem hiding this 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
jaydeluca
reviewed
Jan 14, 2026
87c1813 to
960a046
Compare
jaydeluca
reviewed
Jan 16, 2026
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]>
960a046 to
f2b1f33
Compare
f2b1f33 to
61ce0fe
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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