Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# aoc2022

https://adventofcode.com/2022

## Requirements

The project now targets **Java 21**. Ensure a JDK 21 installation is available
to compile and run the solutions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
<jvmTarget>21</jvmTarget>
</configuration>
Comment on lines 39 to 41
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Ensure Kotlin compilation target is applied in each execution
The global <jvmTarget>21</jvmTarget> sits outside your <execution> blocks, but executions with their own <configuration> (e.g., compile) may override or ignore it. To guarantee both compile and test-compile use JVM 21, move the jvmTarget setting into each execution’s <configuration>.

Proposed diff:

  <execution>
    <id>compile</id>
    <phase>process-sources</phase>
    <goals>
      <goal>compile</goal>
    </goals>
-   <configuration>
-       <sourceDirs>
-           <source>src/main/java</source>
-           <source>target/generated-sources/annotations</source>
-       </sourceDirs>
-   </configuration>
+   <configuration>
+       <sourceDirs>
+           <source>src/main/java</source>
+           <source>target/generated-sources/annotations</source>
+       </sourceDirs>
+       <jvmTarget>21</jvmTarget>
+   </configuration>
  </execution>
  <execution>
    <id>test-compile</id>
    <phase>test-compile</phase>
    <goals>
      <goal>test-compile</goal>
    </goals>
+   <configuration>
+       <jvmTarget>21</jvmTarget>
+   </configuration>
  </execution>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<configuration>
<jvmTarget>1.8</jvmTarget>
<jvmTarget>21</jvmTarget>
</configuration>
<execution>
<id>compile</id>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<source>src/main/java</source>
<source>target/generated-sources/annotations</source>
</sourceDirs>
<jvmTarget>21</jvmTarget>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<jvmTarget>21</jvmTarget>
</configuration>
</execution>
🤖 Prompt for AI Agents
In pom.xml around lines 39 to 41, the <jvmTarget>21</jvmTarget> setting is
placed globally but not inside each <execution> block, which can cause
executions like compile and test-compile to override or ignore it. To fix this,
move the <jvmTarget>21</jvmTarget> configuration into the <configuration>
section of each <execution> block to ensure all executions consistently use JVM
target 21.

</plugin>
<plugin>
Expand Down