Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into yo/pipe-damage

# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/common/block/FluidPipeBlock.java
  • Loading branch information
YoungOnionMC committed May 30, 2024
2 parents 3100dc0 + 093f964 commit d92991d
Show file tree
Hide file tree
Showing 1,178 changed files with 32,106 additions and 19,845 deletions.
5 changes: 0 additions & 5 deletions .editorconfig

This file was deleted.

40 changes: 40 additions & 0 deletions .github/actions/build_setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Setup
description: Setup for standard Java builds

inputs:
update-cache:
description: If cache should be updated
required: false
default: true

runs:
using: 'composite'

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Grant execute permission for gradlew
shell: bash
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-write-only: ${{ inputs.update-cache }}
generate-job-summary: false
gradle-home-cache-includes: |
caches
notifications
jdks
wrapper
31 changes: 16 additions & 15 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,38 @@ jobs:
env:
GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }}
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Build
uses: ./.github/actions/build_setup

- name: Build
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Get Version
id: var
run: |
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'gtceu-|.jar' '{print $2}')
echo version=$MESSAGE >> $GITHUB_OUTPUT
echo "version=$MESSAGE" >> $GITHUB_OUTPUT
- name: release
- name: Release
id: release
uses: Kir-Antipov/mc-publish@v3.3.0
with:
github-tag: ${{ steps.var.outputs.version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
build/libs/!(*-@(dev|sources|javadoc)).jar
- name: Print Output
run: |
echo "Release tag: ${{ steps.release.outputs.github-tag }}"
echo "Release URL: ${{ steps.release.outputs.github-url }}"
echo "Released files: ${{ steps.release.outputs.github-files }}"
17 changes: 7 additions & 10 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
type: boolean
default: true
publishCurseForgeAndModrinth:
description: 'whether publish to the curseforge and modrinth'
description: 'whether to publish to curseforge and modrinth'
required: true
type: boolean
default: true
Expand All @@ -30,29 +30,26 @@ jobs:
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Build
uses: ./.github/actions/build_setup

- name: Build
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2
with:
arguments: build

- if: ${{ inputs.publishMaven }}
name: Publish to Maven
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2
with:
arguments: publish

Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,15 @@ jobs:
GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }}
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Build
uses: ./.github/actions/build_setup

- name: Build
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2
with:
arguments: build

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/format-java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Runs formatting requirements
name: Java Formatting

on:
push:
branches:
- master
paths: ['src/main/java/**', 'src/test/**']
pull_request:
paths: ['src/main/java/**', 'src/test/**']

concurrency:
group: formatting-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Build
uses: ./.github/actions/build_setup

- name: Run Spotless Formatting Check with Gradle
run: ./gradlew spotlessCheck --warning-mode all --build-cache
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias libs.plugins.vineFlower // VineFlower, a better decompiler
alias libs.plugins.machete // automatic jar compressing on build
alias libs.plugins.shadow
alias libs.plugins.spotless
}

apply plugin: "dev.architectury.loom"
Expand Down Expand Up @@ -37,6 +38,7 @@ apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/gradle/scripts/resources.gradle"
apply from: "$rootDir/gradle/scripts/jars.gradle"
apply from: "$rootDir/gradle/scripts/publishing.gradle"
apply from: "$rootDir/gradle/scripts/spotless.gradle"

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
Expand Down
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies {

// AE2
modImplementation(forge.ae2) { transitive = false }
modCompileOnly("curse.maven:ae2wtlib-459929:5217955")

//AlmostUnified
modCompileOnly(forge.almostUnified.forge)
Expand Down
26 changes: 26 additions & 0 deletions gradle/scripts/spotless.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Spotless auto-formatter
// See https://github.com/diffplug/spotless/tree/main/plugin-gradle
// Can be locally toggled via spotless:off/spotless:on comments
spotless {
encoding 'UTF-8'

format 'misc', {
target '.gitignore'

trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
java {
target 'src/main/java/**/*.java', 'src/test/java/**/*.java'

def orderFile = file("$rootDir/spotless/spotless.importorder")
def formatFile = file("$rootDir/spotless/spotless.eclipseformat.xml")

toggleOffOn()
importOrderFile(orderFile)
removeUnusedImports('cleanthat-javaparser-unnecessaryimport')
endWithNewline()
eclipse('4.31').configFile(formatFile)
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 5 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencyResolutionManagement {
// Mod Dependencies Versions
// Common
def jeiVersion = "15.2.0.27"
def reiVersion = "12.0.684"
def reiVersion = "12.1.725"
def emiVersion = "1.0.30"
def ae2Version = "15.0.18"
def kjsVersion = "2001.6.4-build.120"
Expand All @@ -38,6 +38,7 @@ dependencyResolutionManagement {
def quiltMappingsVersion = "5" // https://lambdaurora.dev/tools/import_quilt.html
def parchmentVersion = "2023.09.03" // https://parchmentmc.org/docs/getting-started
def shadowVersion = "7.1.2"
def spotlessVersion = "6.25.0"
def architecturyPluginVersion = "3.4-SNAPSHOT"
def architecturyLoomVersion = "1.3-SNAPSHOT"
def vineFlowerVersion = "1.+"
Expand Down Expand Up @@ -115,6 +116,9 @@ dependencyResolutionManagement {
def shadow = version("shadow", shadowVersion)
plugin("shadow", "com.github.johnrengelman.shadow").versionRef(shadow)

def spotless = version("spotless", spotlessVersion)
plugin("spotless", "com.diffplug.spotless").versionRef(spotless)

def architecturyPlugin = version("architectury", architecturyPluginVersion)
plugin("architectury", "architectury-plugin").versionRef(architecturyPlugin)

Expand Down
Loading

0 comments on commit d92991d

Please sign in to comment.