Skip to content

Commit

Permalink
Update build.gradle (Bram-Hub#741)
Browse files Browse the repository at this point in the history
* Update build.gradle

Fixing the deprecation issues in the autoformatter

* Update build.gradle

* Update build.gradle

* Update to use Java 21

* Automated Java code formatting changes

---------

Co-authored-by: Bram van Heuveln <[email protected]>
  • Loading branch information
charlestian23 and Bram28 authored Feb 21, 2024
1 parent ea6df89 commit 2b036c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/java-autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version '5.3.2'
apply plugin: 'java'
apply plugin: 'application'

spotless{
spotless {
enforceCheck false

format 'misc', {
Expand All @@ -23,7 +23,7 @@ spotless{
endWithNewline()
}

java{
java {
// Use the default importOrder configuration
importOrder()

Expand All @@ -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'
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -168,4 +171,4 @@ tasks.register('copyInstaller', Sync) {
rename("LEGUP-${project.version}", "LEGUP-installer-${project.version}")
}

copyInstaller.dependsOn(jpackage)
copyInstaller.dependsOn(jpackage)
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public String checkRuleRaw(TreeTransition transition) {
public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElement) {
return checkRuleRaw(transition);
}
}
}

0 comments on commit 2b036c0

Please sign in to comment.