Fix Gradle deprecation warnings for Gradle 9.0 compatibility #75
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.
This PR addresses all Gradle deprecation warnings that would make the build incompatible with Gradle 9.0.
Changes Made
1. Fixed
buildDirdeprecationReplaced deprecated
$buildDirproperty with${layout.buildDirectory.get()}in:agent/agent/build.gradle.ktsagent/agent-for-testing/build.gradle.ktsbuildSrc/src/main/kotlin/ai.javaagent-instrumentation.gradle.ktsbuildSrc/src/main/kotlin/ai.sdk-version-file.gradle.kts2. Fixed
archivesBaseNamedeprecationReplaced deprecated
archivesBaseNamewithbase.archivesNamein:etw/java/build.gradle3. Fixed Spotless configuration deprecation
Replaced deprecated
indentWithSpaces()withleadingTabsToSpaces()in:buildSrc/src/main/kotlin/ai.spotless-conventions.gradle.kts4. Fixed task creation deprecation
Replaced deprecated
task<Test>()withtasks.register<Test>()in:buildSrc/src/main/kotlin/ai.smoke-test.gradle.kts5. Removed deprecated system property
Removed
systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=truefromgradle.propertiesas this property is now deprecated and defaults totrue.6. Updated plugin versions
Updated plugins to eliminate deprecated Convention API usage:
2.5.12→2.7.180.8.19→0.9.4Testing
✅ Build passes with
--warning-mode alland produces zero deprecation warnings✅ Agent assembly works correctly
✅ All affected modules build successfully
✅ No functional changes to existing behavior
The build is now fully compatible with Gradle 9.0.
Fixes #74.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.