Skip to content
Merged
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
2 changes: 1 addition & 1 deletion compiled_starters/java/.codecrafters/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

set -e # Exit on failure

exec java -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
exec java --enable-preview -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
4 changes: 2 additions & 2 deletions compiled_starters/java/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Java version used to run your code
# on Codecrafters.
#
# Available versions: java-24
buildpack: java-24
# Available versions: java-25
buildpack: java-25
15 changes: 12 additions & 3 deletions compiled_starters/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
<version>1.0</version>

<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>23</java.version>
<java.version>25</java.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compiled_starters/java/your_program.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ set -e # Exit early if any commands fail
#
# - Edit this to change how your program runs locally
# - Edit .codecrafters/run.sh to change how your program runs remotely
exec java -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
exec java --enable-preview -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
13 changes: 13 additions & 0 deletions dockerfiles/java-25.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1.7-labs
FROM maven:3.9.11-eclipse-temurin-25-alpine

# Ensures the container is re-built if dependency files change
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="pom.xml"

WORKDIR /app

# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
COPY --exclude=.git --exclude=README.md . /app

# Install language-specific dependencies
RUN .codecrafters/compile.sh
2 changes: 1 addition & 1 deletion solutions/java/01-dr6/code/.codecrafters/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

set -e # Exit on failure

exec java -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
exec java --enable-preview -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
4 changes: 2 additions & 2 deletions solutions/java/01-dr6/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Java version used to run your code
# on Codecrafters.
#
# Available versions: java-24
buildpack: java-24
# Available versions: java-25
buildpack: java-25
15 changes: 12 additions & 3 deletions solutions/java/01-dr6/code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
<version>1.0</version>

<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>23</java.version>
<java.version>25</java.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion solutions/java/01-dr6/code/your_program.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ set -e # Exit early if any commands fail
#
# - Edit this to change how your program runs locally
# - Edit .codecrafters/run.sh to change how your program runs remotely
exec java -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
exec java --enable-preview -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
2 changes: 1 addition & 1 deletion starter_templates/java/code/.codecrafters/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

set -e # Exit on failure

exec java -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
exec java --enable-preview -jar /tmp/codecrafters-build-sqlite-java/codecrafters-sqlite.jar "$@"
15 changes: 12 additions & 3 deletions starter_templates/java/code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
<version>1.0</version>

<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>23</java.version>
<java.version>25</java.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
Loading