Compare commits

...

4 Commits

Author SHA1 Message Date
626b5fc866 Update build.yml 2023-01-15 20:29:33 +01:00
f0b4d9b103 Build on macos only 2023-01-15 18:54:50 +01:00
2c8331e82e Debug shadowJar 2023-01-15 18:40:05 +01:00
abbac057ed Default to unix line endings (#3932)
* Default to unix line endings

* Respect preconfigured settings
2023-01-15 17:54:52 +01:00
14 changed files with 11 additions and 62 deletions

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
* text=auto
*.java text
*.jar binary

View File

@ -3,12 +3,12 @@ name: build
on: on:
push: push:
branches: branches:
- v6 - shadow-debug
jobs: jobs:
build: build:
if: github.repository_owner == 'IntellectualSites' if: github.repository_owner == 'IntellectualSites'
runs-on: ubuntu-latest runs-on: macos-latest
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -19,51 +19,5 @@ jobs:
with: with:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
- name: Clean Build - name: Build on macos-latest
run: ./gradlew clean build run: ./gradlew clean build --warning-mode all
- name: Determine release status
if: ${{ runner.os == 'Linux' }}
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Publish Release
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish Snapshot
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6' }}
run: ./gradlew publishToSonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Publish core javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Core/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: core
- name: Publish bukkit javadoc
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'Bukkit/build/docs/javadoc'
destination-github-username: 'IntellectualSites'
destination-repository-name: 'plotsquared-javadocs'
user-email: ${{ secrets.USER_EMAIL }}
target-branch: main
target-directory: bukkit

View File

@ -24,7 +24,6 @@ import org.bukkit.Bukkit;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Map; import java.util.Map;
import java.util.Objects;
public class BukkitWorld implements World<org.bukkit.World> { public class BukkitWorld implements World<org.bukkit.World> {

View File

@ -80,4 +80,3 @@ public class FaweSchematicHandler extends SchematicHandler {
} }
} }

View File

@ -28,7 +28,6 @@ import com.plotsquared.core.generator.HybridUtils;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.expiration.ExpireManager;
import com.plotsquared.core.plot.expiration.PlotAnalysis; import com.plotsquared.core.plot.expiration.PlotAnalysis;
import com.plotsquared.core.plot.flag.GlobalFlagContainer; import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag; import com.plotsquared.core.plot.flag.PlotFlag;
@ -42,7 +41,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;

View File

@ -24,7 +24,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collection; import java.util.Collection;
import java.util.Objects;
/** /**
* A world that contains plots * A world that contains plots

View File

@ -24,7 +24,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Objects;
/** /**
* A plot flag is any property that can be assigned * A plot flag is any property that can be assigned

View File

@ -19,7 +19,6 @@
package com.plotsquared.core.util; package com.plotsquared.core.util;
import com.plotsquared.core.location.Location; import com.plotsquared.core.location.Location;
import com.plotsquared.core.plot.Plot;
import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;

View File

@ -31,7 +31,6 @@ import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.uuid.UUIDMapping; import com.plotsquared.core.uuid.UUIDMapping;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -55,4 +55,3 @@ public class AbstractDelegateOutputStream extends OutputStream {
} }
} }

View File

@ -21,7 +21,6 @@ package com.plotsquared.core.util.query;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
class OwnersIncludeFilter implements PlotFilter { class OwnersIncludeFilter implements PlotFilter {

View File

@ -83,4 +83,3 @@ public interface PlotSquaredTask extends Runnable {
} }
} }

View File

@ -276,4 +276,3 @@ public class AbstractDBTest implements AbstractDB {
} }
} }

View File

@ -90,6 +90,9 @@ subprojects {
java { java {
licenseHeaderFile(rootProject.file("HEADER.txt")) licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java") target("**/*.java")
endWithNewline()
trimTrailingWhitespace()
removeUnusedImports()
} }
} }