-
Notifications
You must be signed in to change notification settings - Fork 986
Convert distro build scripts from Groovy to Kotlin DSL #14176
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR converts all distro example build scripts from Groovy (.gradle
) to Kotlin DSL (.gradle.kts
), removes the old Groovy counterparts, and introduces Kotlin-based convention plugins under buildSrc
for formatting, shadowing, and instrumentation.
- Migrate root and subproject settings/build scripts to Kotlin DSL
- Remove legacy Groovy scripts and consolidate conventions in
buildSrc
- Update dependency management and plugin declarations in Kotlin
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
examples/distro/testing/agent-for-testing/build.gradle.kts | Kotlin DSL version of the agent-for-testing build |
examples/distro/smoke-tests/build.gradle.kts | Kotlin DSL smoke tests build script |
examples/distro/settings.gradle.kts | Kotlin DSL settings with pluginManagement |
examples/distro/settings.gradle | Removed legacy Groovy settings |
examples/distro/instrumentation/servlet-3/build.gradle.kts | Kotlin DSL servlet-3 instrumentation build |
examples/distro/instrumentation/servlet-3/build.gradle | Removed Groovy servlet-3 script |
examples/distro/instrumentation/build.gradle.kts | Kotlin DSL instrumentation aggregator script |
examples/distro/instrumentation/build.gradle | Removed legacy Groovy instrumentation script |
examples/distro/gradle/spotless.license.java | New license header file for Spotless |
examples/distro/gradle/shadow.gradle | Removed legacy Groovy shadow conventions |
examples/distro/gradle/instrumentation.gradle | Removed Groovy instrumentation conventions |
examples/distro/dependencyManagement/build.gradle.kts | Kotlin DSL BOM/platform management |
examples/distro/custom/build.gradle.kts | Kotlin DSL custom project build |
examples/distro/buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts | New Kotlin Spotless convention plugin |
examples/distro/buildSrc/src/main/kotlin/otel.shadow-conventions.gradle.kts | New Kotlin ShadowJar convention plugin |
examples/distro/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts | New Kotlin Java conventions plugin |
examples/distro/buildSrc/src/main/kotlin/otel.instrumentation-conventions.gradle.kts | New Kotlin instrumentation conventions plugin |
examples/distro/buildSrc/build.gradle.kts | buildSrc Kotlin DSL setup, Spotless & plugin deps |
examples/distro/build.gradle.kts | Root Kotlin DSL build script |
examples/distro/build.gradle | Removed Groovy root build script |
examples/distro/bootstrap/build.gradle.kts | Kotlin DSL bootstrap project build stub |
examples/distro/bootstrap/build.gradle | Removed Groovy bootstrap script |
examples/distro/agent/build.gradle.kts | Kotlin DSL agent distro build |
examples/distro/agent/build.gradle | Removed Groovy agent build script |
} | ||
|
||
val instrumentationTest = tasks.named("test") | ||
val instrumentationDeps = dependencies |
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.
The instrumentationDeps
variable is declared but never used. Consider removing it to reduce noise.
val instrumentationDeps = dependencies |
Copilot uses AI. Check for mistakes.
} | ||
|
||
val otelVersion = "1.51.0" | ||
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1") |
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.
The otelAlphaVersion
variable is defined but not used anywhere in this script. You can remove it to simplify the code.
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1") |
Copilot uses AI. Check for mistakes.
} | ||
|
||
dependencies { | ||
} |
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.
[nitpick] This dependencies
block is empty and can be removed to declutter the build script.
} | |
dependencies { | |
} | |
} |
Copilot uses AI. Check for mistakes.
@@ -1,5 +1,5 @@ | |||
plugins { | |||
id "java" | |||
id("otel.java-conventions") | |||
} | |||
|
|||
dependencies { |
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.
[nitpick] This dependencies
block is empty and can be removed since there are no dependencies defined.
Copilot uses AI. Check for mistakes.
No description provided.