Skip to content

Remove ExperimentalPathApi opt-in from build files - #204

Merged
jGleitz merged 4 commits into
jGleitz-patch-1from
copilot/fix-gradle-ci-error
Feb 28, 2026
Merged

Remove ExperimentalPathApi opt-in from build files#204
jGleitz merged 4 commits into
jGleitz-patch-1from
copilot/fix-gradle-ci-error

Conversation

Copilot AI commented Feb 28, 2026

Copy link
Copy Markdown

kotlin.io.path.ExperimentalPathApi graduated to stable in recent Kotlin versions. The -opt-in compiler flag is no longer needed.

  • Removed freeCompilerArgs.add("-opt-in=kotlin.io.path.ExperimentalPathApi") from base/build.gradle.kts, kotest/build.gradle.kts, and spek/build.gradle.kts
  • explicitApi() is intentionally preserved — it is the mode configuration, not an opt-in

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:

  • docs.oracle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /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=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:+AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath6988300048491920042txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 1' (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:+AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath488314664958885122txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 2' (dns block)
  • kotlinlang.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /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=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:+AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath6988300048491920042txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 1' (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:+AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath488314664958885122txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 2' (dns block)

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

Original prompt

Pull request: #192

the CI is failing in this PR because of an error in gradle. please develop a well-founded theory of what is causing the error. explain step by step how the error is caused. discard the theory if the chain of reasons is not logically sound. if a theory is discarded, try again using the same methodology.

use the internet to research the issue. run command to analyse the error if necessary.

generate a summary of your theory and reasoning.

if you have a sound theory, develop a plan to fix the issue and open a pr that implements the fix


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Upgrade io.github.gradle-nexus.publish-plugin from 1.3.0 to 2.0.0
  (fixes ClassNotFoundException for DefaultDecoratedConvention removed in Gradle 9)
- Rename closeAndReleaseStagingRepository to closeAndReleaseStagingRepositories
  (breaking change in nexus plugin 2.0.0)
- Replace deprecated KotlinCompilerVersion with version-less kotlin() dependency
- Migrate kotlinOptions DSL to compilerOptions DSL (deprecated in Kotlin 2.3.10)
- Replace -Xopt-in with -opt-in compiler flag
- Replace deprecated String.toLowerCase() with lowercase()
- Replace deprecated buildDir with layout.buildDirectory
- Add junit-platform-launcher dependency (required by Gradle 9)

Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI error in Gradle build process fix: Gradle 9 compatibility — upgrade nexus plugin and fix deprecated APIs Feb 28, 2026
Copilot AI changed the title fix: Gradle 9 compatibility — upgrade nexus plugin and fix deprecated APIs Fix Gradle 9 compatibility: upgrade nexus plugin and migrate deprecated APIs Feb 28, 2026
Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copilot AI changed the title Fix Gradle 9 compatibility: upgrade nexus plugin and migrate deprecated APIs Remove explicitApi() opt-in from build files Feb 28, 2026
Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copilot AI changed the title Remove explicitApi() opt-in from build files Remove ExperimentalPathApi opt-in from build files Feb 28, 2026
@jGleitz
jGleitz requested a review from Copilot February 28, 2026 20:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the -opt-in=kotlin.io.path.ExperimentalPathApi compiler flag now that the Kotlin Path API is stable, while also modernizing parts of the Gradle/Kotlin build configuration.

Changes:

  • Remove ExperimentalPathApi opt-in flags from module build scripts.
  • Switch Kotlin compilation configuration to kotlin { compilerOptions { ... } } with JvmTarget.JVM_17 and simplify kotlin("reflect") dependency declaration.
  • Additional build/runtime adjustments (e.g., adding junit-platform-launcher, updating nexus publish plugin, minor Kotlin stdlib API update in production code).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
base/build.gradle.kts Drops opt-in flag, moves to compilerOptions, adds JUnit Platform launcher runtime dep, and updates test working dir setup.
kotest/build.gradle.kts Drops opt-in flag, moves to compilerOptions, adds JUnit Platform launcher runtime dep.
spek/build.gradle.kts Drops opt-in flag, moves to compilerOptions, adds JUnit Platform launcher runtime dep.
build.gradle.kts Updates nexus publish plugin version and adjusts release task dependency to plural staging close/release task.
base/src/main/kotlin/DefaultTestFiles.kt Replaces deprecated toLowerCase() with lowercase().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread base/build.gradle.kts
Comment thread kotest/build.gradle.kts
Comment thread spek/build.gradle.kts
Comment thread base/src/main/kotlin/DefaultTestFiles.kt
@jGleitz
jGleitz marked this pull request as ready for review February 28, 2026 20:40
@jGleitz
jGleitz merged commit 8f13bb4 into jGleitz-patch-1 Feb 28, 2026
14 checks passed
@jGleitz
jGleitz deleted the copilot/fix-gradle-ci-error branch February 28, 2026 20:40
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.

3 participants