Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 19, 2025

This PR resolves several Gradle deprecation warnings that appeared when running ./gradlew assemble with --warning-mode=all. The warnings were related to deprecated Kotlin/Gradle APIs that will be removed in future versions.

Fixed Warnings

1. Deprecated Task Creation API

Fixed in OtelVersionClassPlugin.kt:

  • Replaced deprecated project.task(name, configureAction) with project.tasks.register(name, configureAction)
  • The old API is deprecated and will be removed in a future Gradle version

2. Deprecated Configuration.isVisible Property

Fixed in multiple build files:

  • Completely removed isVisible = false property usage instead of suppressing warnings:
    • otel.jacoco-conventions.gradle.kts (2 occurrences)
    • otel.java-conventions.gradle.kts (1 occurrence)
    • all/build.gradle.kts (2 occurrences)

The isVisible property was only used to hide internal configurations from dependency reports and IDE views, but it's not functionally necessary. Removing it entirely eliminates the deprecation warnings while maintaining all functionality.

Remaining Warnings

Two warnings remain that originate from the external protobuf-gradle-plugin (v0.9.5):

  • Multi-string dependency notation for platform-specific protobuf compiler executables
  • These are internal to the plugin and cannot be resolved without a plugin update

Impact

  • ✅ Build continues to work correctly
  • ✅ All user-controllable deprecation warnings resolved
  • ✅ No functional changes to the build process
  • ✅ Prepares codebase for future Gradle versions

The changes are minimal and focused only on resolving the deprecation warnings without altering build behavior.


💡 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.

@Copilot Copilot AI changed the title [WIP] Run ./gradlew assemble and fix all gradle warnings Fix Gradle deprecation warnings in build configuration Sep 19, 2025
@Copilot Copilot AI requested a review from trask September 19, 2025 17:31
Copy link
Owner

@trask trask left a comment

Choose a reason for hiding this comment

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

@copilot is isVisible even needed? can we just remove it?

Copy link
Author

Copilot AI commented Sep 19, 2025

@copilot is isVisible even needed? can we just remove it?

You're absolutely right! The isVisible property isn't needed and removing it entirely is much cleaner than suppressing the deprecation warnings.

I've removed all isVisible = false lines from the configuration blocks. The property was only used to hide these internal configurations from dependency reports and IDE views, but it doesn't affect functionality. The build still passes successfully and all those deprecation warnings are now gone.

Fixed in commit aab872c.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/gradle-daemon-main-9.1.0.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/agents/gradle-instrumentation-agent-9.1.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.1.0 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of trask September 19, 2025 19:00
@Copilot Copilot AI requested a review from trask September 19, 2025 19:00
@trask trask force-pushed the main branch 15 times, most recently from f22b5fc to 8a4d66b Compare September 23, 2025 15:38
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.

2 participants