Skip to content

Commit

Permalink
Merge pull request #156 from donraab/master
Browse files Browse the repository at this point in the history
Update Coffee Kata to JDK 21.
  • Loading branch information
donraab authored Dec 1, 2023
2 parents 8fc0b3b + cccfcc6 commit b180408
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 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>
13 changes: 6 additions & 7 deletions coffee-shop-kata/SETUP.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
## 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 +25,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 b180408

Please sign in to comment.