Skip to content

Commit

Permalink
Reformat with checkstyle
Browse files Browse the repository at this point in the history
Update Gradle
  • Loading branch information
modmuss50 committed Dec 15, 2023
1 parent 5366767 commit 0475e5c
Show file tree
Hide file tree
Showing 26 changed files with 400 additions and 309 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ jobs:
build:
strategy:
matrix:
java: [8-jdk, 11-jdk, 15-jdk]
runs-on: ubuntu-20.04
java: [21-jdk]
runs-on: ubuntu-22.04
container:
image: openjdk:${{ matrix.java }}
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- run: chmod +x ./gradlew
- run: ./gradlew build --stacktrace
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: openjdk:15-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- run: chmod +x ./gradlew
- run: ./gradlew checkVersion build publish --stacktrace
Expand Down
27 changes: 15 additions & 12 deletions HEADER
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Copyright (c) 2019 FabricMC
/*
* Copyright (c) $YEAR FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
35 changes: 26 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id 'java'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'checkstyle'
id 'eclipse'
id "com.diffplug.spotless" version "6.23.3"
}

group 'net.fabricmc'
Expand All @@ -11,10 +12,9 @@ version '1.5.3'
def ENV = System.getenv()
version = version + (ENV.GITHUB_ACTIONS ? "" : "+local")

sourceCompatibility = 1.8
targetCompatibility = 1.8

archivesBaseName = "fabric-meta"
base {
archivesName = "fabric-meta"
}

repositories {
mavenCentral()
Expand All @@ -27,6 +27,11 @@ dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
}

java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

jar {
manifest {
attributes "Main-Class": "net.fabricmc.meta.FabricMeta"
Expand All @@ -43,16 +48,28 @@ tasks.withType(JavaCompile).configureEach {
}
}

license {
header file('HEADER')
include '**/*.java'
spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX

java {
licenseHeaderFile(rootProject.file("HEADER"))
removeUnusedImports()
importOrder('java', 'javax', '', 'net.fabricmc')
indentWithTabs()
trimTrailingWhitespace()
}
}

checkstyle {
configFile = file('checkstyle.xml')
toolVersion = "10.12.1"
}

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
artifactId project.base.archivesName.get()
version project.version

artifact jar
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0475e5c

Please sign in to comment.