Skip to content

Configure project to explicitly use JDK 11 for IntelliJ recognition#84

Merged
ehmkah merged 4 commits intomasterfrom
copilot/fix-83
Jul 2, 2025
Merged

Configure project to explicitly use JDK 11 for IntelliJ recognition#84
ehmkah merged 4 commits intomasterfrom
copilot/fix-83

Conversation

Copy link
Contributor

Copilot AI commented Jul 2, 2025

This PR configures the Gradle build to explicitly specify JDK 11 requirements, ensuring IntelliJ IDEA and other IDEs properly recognize and use the correct Java version when importing the project.

Changes Made

build.gradle

  • Added Java toolchain configuration using Gradle's modern toolchain API:
    java {
        toolchain {
            languageVersion = JavaLanguageVersion.of(11)
        }
    }
  • Configured Kotlin compilation to target JVM 11:
    compileKotlin {
        kotlinOptions {
            jvmTarget = "11"
        }
    }
    compileTestKotlin {
        kotlinOptions {
            jvmTarget = "11"
        }
    }

gradle.properties (new file)

  • Added explicit Java version documentation:
    # Java version configuration
    # Explicitly set Java version requirement
    java.version=11

README.adoc

  • Updated development section to clearly document Java 11 requirement
  • Added Requirements subsection for better developer onboarding

Benefits

  1. IntelliJ IDEA will automatically detect and configure JDK 11 when importing via Gradle
  2. Gradle toolchain will automatically download JDK 11 if not available locally
  3. Consistent builds across different development environments
  4. Clear documentation for contributors about Java version requirements

The project has been using Java 11 since version 1.8.0 (as noted in CHANGELOG.md), but the build configuration didn't explicitly enforce this requirement. These changes make the Java 11 dependency explicit and automatic.

Fixes #83.

Warning

Firewall rules blocked me from connecting to one or more addresses

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

  • cache-redirector.jetbrains.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --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-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.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/lib/gradle-launcher-7.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.2 (dns block)

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


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits July 2, 2025 19:55
Co-authored-by: ehmkah <6233328+ehmkah@users.noreply.github.com>
Co-authored-by: ehmkah <6233328+ehmkah@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure this project that intellij knows it should use jdk11 Configure project to explicitly use JDK 11 for IntelliJ recognition Jul 2, 2025
Copilot AI requested a review from ehmkah July 2, 2025 19:58
Copilot finished work on behalf of ehmkah July 2, 2025 19:58
@ehmkah
Copy link
Owner

ehmkah commented Jul 2, 2025

Please add an entry to changelog what you changed

Co-authored-by: ehmkah <6233328+ehmkah@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 2, 2025

Please add an entry to changelog what you changed

Added changelog entry for the Gradle build configuration changes in commit c2807e2.

@ehmkah ehmkah marked this pull request as ready for review July 2, 2025 20:10
Copilot finished work on behalf of ehmkah July 2, 2025 20:10
@ehmkah ehmkah merged commit 3818b5b into master Jul 2, 2025
1 check passed
@ehmkah ehmkah deleted the copilot/fix-83 branch July 2, 2025 20:13
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.

Configure this project that intellij knows it should use jdk11

2 participants

Comments