Closed Wang-Matthew closed 1 year ago
@Wang-Matthew thanks for pointing this out; for simplicity, it'd be better to use compileJava
instead as follows:
compileJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
I updated the build.gradle
so please take a look.
For the instructions in 0.1 of the textbook it says to open build.gradle and make sure sourceCompatibility and targetCompatibility are set to java version 17.
I looked through the IntelliJ documentation which told me those were historical options for the Java compiler and said you could also set them with the JavaCompile task. I used this code:
instead and I was wondering if this was acceptable because I was getting errors when I wrote
as the textbook instructs.