Skip to content

Commit

Permalink
Update Coffee Kata to JDK 21.
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Raab <[email protected]>
  • Loading branch information
donraab committed Dec 1, 2023
1 parent 8fc0b3b commit 375d372
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Guava, Apache Commons and/or Vavr on a simple domain


## What you will need to build the katas
1. Java 17
1. Java 21
2. Maven 3.6.1+
3. IDE of your choice

Expand Down
6 changes: 3 additions & 3 deletions coffee-shop-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<junit5.version>5.10.0</junit5.version>
</properties>

Expand Down Expand Up @@ -70,4 +70,4 @@
</plugins>
</build>

</project>
</project>
12 changes: 6 additions & 6 deletions coffee-shop-kata/SETUP.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
## Setting up the project

### Requirements
* [JDK 20](https://jdk.java.net/20/) installed on your computer
* [JDK 21](https://jdk.java.net/21/) installed on your computer

Note: The latest version of IntelliJ only supports Java 20
* [Maven 3.6.1+](https://maven.apache.org/download.cgi) installed on your computer
* [IntelliJ IDEA 2023.1+](https://www.jetbrains.com/idea/download/?section=windows) or similar IDE for Java
* [IntelliJ IDEA 2023.2.5+](https://www.jetbrains.com/idea/download/?section=windows) or similar IDE for Java

### Project setup
1. Git clone the entire [code-katas](https://github.com/BNYMellon/CodeKatas) project from GitHub or download the project
as a .zip file.
2. Launch the project in the IDE and point to the pom.xml to be opened as a project.
You can find more instructions on how to do
that [here](https://www.jetbrains.com/idea/guide/tutorials/working-with-maven/importing-a-project/).
3. To use Java 20 preview features in IntelliJ IDEA, follow these steps:
3. To use Java 21 features in IntelliJ IDEA, follow these steps:
- Go to File | Project Structure.
- Set the Project SDK to 20.
- Set the Project language level to "20 (Preview)...".
- Set the Project SDK to 21.
- Set the Project language level to "21 - Record patterns, pattern matching for switch...".
- Make sure you have the correct JDK selected.
4. To verify that the Java 8 module is set up correctly,
run [CoffeeShopTest](jdk8/src/test/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopTest.java) in the
Expand All @@ -26,4 +26,4 @@
jdk21 module - the class should compile but all tests will fail.

### Getting started
* Follow the [README](README.md) for instructions on how to complete the kata.
* Follow the [README](README.md) for instructions on how to complete the kata.
4 changes: 2 additions & 2 deletions coffee-shop-kata/jdk21/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<junit5.version>5.10.0</junit5.version>
</properties>

Expand Down

0 comments on commit 375d372

Please sign in to comment.