Skip to content

Commit

Permalink
Update pipelines command
Browse files Browse the repository at this point in the history
  • Loading branch information
zelytra committed Sep 21, 2024
1 parent 31ecfab commit e6e1079
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build
run: ./gradlew clean build spotlessApply
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew spotlessCheck
run: ./gradlew clean build spotlessCheck
39 changes: 15 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.diffplug.spotless:spotless-plugin-gradle:7.0.0.BETA2")
}
}

plugins {
id 'java'
id("com.diffplug.spotless") version "7.0.0.BETA2"
id 'com.diffplug.spotless' version '6.25.0'
}

group = 'fr.zelytra'
Expand Down Expand Up @@ -45,18 +34,6 @@ dependencies {
implementation 'com.mojang:authlib:1.5.21' // Authlib dependency for GameProfile
}

spotless {
java {
target 'src/main/java/**/*.java', 'src/test/java/**/*.java'
importOrder()
removeUnusedImports()
cleanthat()
trimTrailingWhitespace()
formatAnnotations()
eclipse()
}
}

def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
Expand All @@ -67,6 +44,20 @@ java {
}
}

spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
eclipse()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'

Expand Down
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

0 comments on commit e6e1079

Please sign in to comment.