diff --git a/.github/workflows/java-autoformat.yml b/.github/workflows/java-autoformat.yml index 0a2f42112..7aa2487cb 100644 --- a/.github/workflows/java-autoformat.yml +++ b/.github/workflows/java-autoformat.yml @@ -11,10 +11,11 @@ jobs: with: ref: ${{ github.head_ref }} - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 21 + distribution: temurin - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/build.gradle b/build.gradle index 445a7f8ea..75a2ec77e 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ version '5.3.2' apply plugin: 'java' apply plugin: 'application' -spotless{ +spotless { enforceCheck false format 'misc', { @@ -23,7 +23,7 @@ spotless{ endWithNewline() } - java{ + java { // Use the default importOrder configuration importOrder() @@ -38,9 +38,14 @@ spotless{ apply plugin: 'checkstyle' -mainClassName = 'edu.rpi.legup.Legup' +application { + mainClass.set('edu.rpi.legup.Legup') +} -sourceCompatibility = 21 +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} dependencies { implementation 'org.jetbrains:annotations:20.1.0' @@ -133,11 +138,9 @@ task buildNativeWindows(type: Exec, dependsOn: 'createExe') { commandLine 'cmd', '/c', 'make_windows_installer.bat' } - repositories { mavenCentral() } -targetCompatibility = JavaVersion.VERSION_21 tasks.register("jpackage") { group("jpackage") @@ -168,4 +171,4 @@ tasks.register('copyInstaller', Sync) { rename("LEGUP-${project.version}", "LEGUP-installer-${project.version}") } -copyInstaller.dependsOn(jpackage) \ No newline at end of file +copyInstaller.dependsOn(jpackage) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java index 600a9898d..5885f98f8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java @@ -60,4 +60,4 @@ public String checkRuleRaw(TreeTransition transition) { public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElement) { return checkRuleRaw(transition); } -} \ No newline at end of file +}