From 82ed075ee8a7aaf8f6cf020d8a3c1bb25e3d2633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MC=7E=E8=9B=9F=E9=BE=99?= <1610105206@qq.com> Date: Wed, 5 Jun 2024 21:14:22 +0800 Subject: [PATCH] Clean Up Completely remove maven build (pom.xml and maven.yml) Delete some useless(might) files --- .checkstyle.xml | 203 ------ .codeclimate.yml | 44 -- .editorconfig | 13 - .github/workflows/build.yml | 21 + .github/workflows/maven.yml | 49 -- .gitignore | 118 ---- .idea/.gitignore | 3 - .idea/codeStyleSettings.xml | 291 --------- .travis.yml | 35 -- README.md | 20 + pom.xml | 1158 ----------------------------------- 11 files changed, 41 insertions(+), 1914 deletions(-) delete mode 100644 .checkstyle.xml delete mode 100644 .codeclimate.yml delete mode 100644 .editorconfig delete mode 100644 .github/workflows/maven.yml delete mode 100644 .idea/.gitignore delete mode 100644 .idea/codeStyleSettings.xml delete mode 100644 .travis.yml delete mode 100644 pom.xml diff --git a/.checkstyle.xml b/.checkstyle.xml deleted file mode 100644 index 0d4cb9a2..00000000 --- a/.checkstyle.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 53689986..00000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: '2' # required to adjust maintainability checks - -plugins: - checkstyle: - enabled: true - config: - file: '.checkstyle.xml' - -checks: - # We disable all the following CodeClimate checks: Checkstyle already checks for these things and has the advantage - # that the Checkstyle config can also be used in one's IDE. - argument-count: - enabled: false - complex-logic: - enabled: false - file-lines: - enabled: false - method-complexity: - enabled: false - method-count: - enabled: false - method-lines: - enabled: false - nested-control-flow: - enabled: false - return-statements: - enabled: false - similar-code: - enabled: false - # The "identical-code" check would be cool to enable since Checkstyle offers no such functionality, but it is - # too aggressive and we'd have to suppress many reported warnings. - identical-code: - enabled: false - -exclude_patterns: - # Exclude code from third-party sources - - 'src/main/java/fr/xephi/authme/mail/OAuth2Provider.java' - - 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java' - - 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java' - - 'src/main/java/fr/xephi/authme/security/crypts/PhpBB.java' - - 'src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java' - - 'src/main/java/fr/xephi/authme/security/crypts/Wordpress.java' - # Don't check test classes - - 'src/test/java/**/*Test.java' diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index ae800ac6..00000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true - -# Set the charset, and space indention -[*.java] -charset = utf-8 -indent_style = space -indent_size = 4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db8e76a4..7c008d28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,3 +37,24 @@ jobs: with: name: Artifacts path: outs/ + runtime-test: + name: Plugin Runtime Test + needs: [ Build ] + runs-on: ubuntu-latest + strategy: + matrix: + include: + - mcVersion: '1.8.8' + javaVersion: '8' + - mcVersion: '1.12.2' + javaVersion: '8' + - mcVersion: '1.18.2' + javaVersion: '17' + - mcVersion: '1.20.4' + javaVersion: '21' + steps: + - uses: HaHaWTH/minecraft-plugin-runtime-test@paper + with: + server-version: ${{ matrix.mcVersion }} + java-version: ${{ matrix.javaVersion }} + artifact-name: Artifacts diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index bdff351a..00000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Java CI - -on: - push: - pull_request: - branches: - - master - -jobs: - Build: - strategy: - matrix: - jdkversion: [ 21 ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ matrix.jdkversion }} - cache: 'maven' - - name: Build - run: mvn -V -B clean package --file pom.xml - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: Download - path: ./target/AuthMe-5.6.0-FORK-Universal.jar - runtime-test: - name: Plugin Runtime Test - needs: [Build] - runs-on: ubuntu-latest - strategy: - matrix: - include: - - mcVersion: '1.8.8' - javaVersion: '8' - - mcVersion: '1.12.2' - javaVersion: '8' - - mcVersion: '1.18.2' - javaVersion: '17' - - mcVersion: '1.20.4' - javaVersion: '21' - steps: - - uses: HaHaWTH/minecraft-plugin-runtime-test@paper - with: - server-version: ${{ matrix.mcVersion }} - java-version: ${{ matrix.javaVersion }} - artifact-name: Download diff --git a/.gitignore b/.gitignore index 97923035..97fe5d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,121 +2,3 @@ .idea build outs - -### Java files ### -*.class -MANIFEST.MF - -# Package Files -#*.jar -*.war -*.ear - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# Mac OS -.DS_Store - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm -# Ignore project files -*.iml -*.java___jb_tmp___ - -# Ignore IDEA directory -.idea/* -.idea/ - - -# Include the project's code style settings file - -# File-based project format: -*.ipr -*.iws - -### Plugin-specific files: ### -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties - - - -### Eclipse ### -*.pydevproject -.metadata -.gradle -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# JDT-specific (Eclipse Java Development Tools) -.classpath - -# PDT-specific -.buildpath - -# sbteclipse plugin -.target - -# TeXlipse plugin -.texlipse - - - -### Maven ### -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties - - - -### NetBeans ### -nbproject/private/ -build/ -nbbuild/ -dist/ -nbdist/ -nbactions.xml -nb-configuration.xml -.nb-gradle/ - - - -### Git ### -# Don't exclude the .gitignore itself -!.gitignore -/samples/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 359bb530..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index 71001a85..00000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7ca0e106..00000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -dist: focal - -language: java - -matrix: - include: - - env: - - JDK_VERSION=8 - - env: - - JDK_VERSION=11 - - env: - - JDK_VERSION=17 - -before_install: - - "[[ -d $HOME/.sdkman/ ]] && [[ -d $HOME/.sdkman/bin/ ]] || rm -rf $HOME/.sdkman/" - - curl -s "https://get.sdkman.io" | bash - - mkdir -p "$HOME/.sdkman/etc/" - - echo sdkman_auto_answer=true > "$HOME/.sdkman/etc/config" - - echo sdkman_auto_selfupdate=true >> "$HOME/.sdkman/etc/config" - - source "$HOME/.sdkman/bin/sdkman-init.sh" - -install: - - sdk install java $(sdk list java | grep -o "$JDK_VERSION\.[0-9]*\.[0-9]*\-open" | head -1) - - sdk install maven - - export JAVA_HOME="$HOME/.sdkman/candidates/java/current" - - export PATH=${JAVA_HOME}/bin:${PATH} - - export MAVEN_HOME="$HOME/.sdkman/candidates/maven/current" - - export M2_HOME="$MAVEN_HOME" - - export PATH=${M2_HOME}/bin:${PATH} - - env - - mvn -v - -cache: - directories: - - $HOME/.m2/repository diff --git a/README.md b/README.md index ea5e7e44..2e1d5171 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,26 @@ If you are using FRP(内网穿透) for your server, this plugin may help [HAProx **Pull Requests and suggestions are welcome!** +## Building + +* [Gradle](https://gradle.org/) - Dependency Management + +The GradleWrapper in included in this project. + +**Windows:** + +``` +gradlew.bat clean build +``` + +**macOS/Linux:** + +``` +./gradlew clean build +``` + +Build artifacts should be found in `./outs` folder. + ## License Only modifications to AuthMeReloaded is under AGPL-3.0 license, AuthMeReloaded is licensed under GPL-3.0. diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 7de8a295..00000000 --- a/pom.xml +++ /dev/null @@ -1,1158 +0,0 @@ - - - 4.0.0 - - fr.xephi - authme - 5.6.0-FORK - - AuthMeReReloaded - Fork of the first authentication plugin for the Bukkit API! - 2013 - https://github.com/AuthMe/AuthMeReloaded - - - AuthMe-Team - https://github.com/AuthMe - - - - scm:git:https://github.com/AuthMe/AuthMeReloaded.git - scm:git:git@github.com:AuthMe/AuthMeReloaded.git - https://github.com/AuthMe/AuthMeReloaded - - - - jenkins - https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/ - - - - GitHub - https://github.com/AuthMe/AuthMeReloaded/issues - - - - - codemc-snapshots - https://repo.codemc.io/repository/maven-snapshots/ - - - codemc-releases - https://repo.codemc.io/repository/maven-releases/ - - - - - - The GNU Public Licence version 3 (GPLv3) - https://www.gnu.org/licenses/gpl-3.0.html - repo - - - - - - false - - - UTF-8 - UTF-8 - 1.8 - 1.8 - 8 - 11 - 3.6.3 - - - 1.20.6-R0.1-SNAPSHOT - - - AuthMe - 28 - ${project.version}-b${project.buildNumber} - ${project.outputName}-${project.version} - - - ${project.outputName} - ${project.versionCode} - ${project.groupId}.${project.artifactId}.${pluginDescription.name} - sgdc3, games647, Hex3l, krusic22 - - - - - clean package - - ${project.finalNameBase}-noshade - - - . - false - - LICENSE - - - - src/main/resources/ - true - - - src/main/resources/messages/ - ./messages/ - false - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.7.0 - - false - false - true - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.5.0 - - - enforce-environment - - enforce - - - - - ${maven.minimumVersion} - - - [17,) - - - true - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 3.3.2 - - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.1 - - - mmdb - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - ${java.source} - ${java.target} - ${java.apiVersion} - - - - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - pre-unit-test - - prepare-agent - - - - post-unit-test - - report - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.4.1 - - - - mojang - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - ${project.finalNameBase} - - 8 - - - - attach-javadoc - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.3.1 - - ${project.finalNameBase} - - - - attach-sources - - jar - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.6.0 - - - shaded-jar - package - - shade - - - ${project.finalNameBase}-Lite - - - - com.google.guava:guava - com.google.guava:failureaccess - com.google.guava:listenablefuture - com.google.errorprone:error_prone_annotations - com.google.j2objc:j2objc-annotations - - com.google.code.gson:gson - - - - - org.apache.http - fr.xephi.authme.libs.org.apache.http - - - org.apache.commons - fr.xephi.authme.libs.org.apache.commons - - - waffle - fr.xephi.authme.libs.waffle - - - com.github.benmanes.caffeine - fr.xephi.authme.libs.com.github.benmanes.caffeine - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - shaded-jar-relocate - package - - shade - - - ${project.finalNameBase}-Universal - - - com.google.common - fr.xephi.authme.libs.com.google.common - - - com.google.thirdparty - fr.xephi.authme.libs.com.google.thirdparty - - - com.google.j2objc - fr.xephi.authme.libs.com.google.j2objc - - - com.google.errorprone - fr.xephi.authme.libs.com.google.errorprone - - - com.google.gson - fr.xephi.authme.libs.com.google.gson - - - org.apache.http - fr.xephi.authme.libs.org.apache.http - - - org.apache.commons - fr.xephi.authme.libs.org.apache.commons - - - waffle - fr.xephi.authme.libs.waffle - - - com.github.benmanes.caffeine - fr.xephi.authme.libs.com.github.benmanes.caffeine - - - - - - - - false - - true - - ${project.finalNameBase} - - - - - ch.jalu - fr.xephi.authme.libs.ch.jalu - - - com.zaxxer.hikari - fr.xephi.authme.libs.com.zaxxer.hikari - - - org.slf4j - fr.xephi.authme.libs.org.slf4j - - - com.maxmind.db - fr.xephi.authme.libs.com.maxmind.db - - - com.ice.tar - fr.xephi.authme.libs.com.icetar.tar - - - net.ricecode.similarity - fr.xephi.authme.libs.ricecode.net.ricecode.similarity - - - de.rtner - fr.xephi.authme.libs.de.rtner - - - org.picketbox - fr.xephi.authme.libs.org.picketbox - - - org.jboss.crypto - fr.xephi.authme.libs.org.jboss.crypto - - - org.jboss.security - fr.xephi.authme.libs.org.jboss.security - - - de.mkammerer - fr.xephi.authme.libs.de.mkammerer - - - com.warrenstrange - fr.xephi.authme.libs.com.warrenstrange - - - javax.inject - fr.xephi.authme.libs.javax.inject - - - at.favre.lib - fr.xephi.authme.libs.at.favre.lib - - - org.postgresql - fr.xephi.authme.libs.org.postgresql - - - - org.bstats - fr.xephi.authme.libs.org.bstats - - - org.mariadb.jdbc - fr.xephi.authme.libs.org.mariadb.jdbc - - - com.github.Anon8281.universalScheduler - fr.xephi.authme.libs.com.github.Anon8281.universalScheduler - - - com.mysql - fr.xephi.authme.libs.com.mysql - - - com.google.protobuf - fr.xephi.authme.libs.com.google.protobuf - - - io.netty - fr.xephi.authme.libs.io.netty - - - org.apache.commons.validator - fr.xephi.authme.libs.org.apache.commons.validator - - - com.alessiodp.libby - fr.xephi.authme.libs.com.alessiodp.libby - - - net.kyori.adventure - fr.xephi.authme.libs.net.kyori.adventure - - - net.kyori.examination - fr.xephi.authme.libs.net.kyori.examination - - - net.kyori.option - fr.xephi.authme.libs.net.kyori.option - - - - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - META-INF/*.RSA - META-INF/DEPENDENCIES - META-INF/**/module-info.class - - - - - - - - false - - - - - - - - org.apache.maven.plugins - maven-install-plugin - 3.1.2 - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.1.2 - - - - org.apache.maven.plugins - maven-site-plugin - 3.12.1 - - - - org.eluder.coveralls - coveralls-maven-plugin - 4.3.0 - - - false - - - - javax.xml.bind - jaxb-api - 2.3.1 - - - - - - - - - opencollab-snapshot-main - https://repo.opencollab.dev/main/ - - - opencollab-maven-snapshots - https://repo.opencollab.dev/maven-snapshots/ - - - - - sonatype-oss-snapshots1 - https://s01.oss.sonatype.org/content/repositories/snapshots/ - - - - - apache-snapshots - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - - - spigotmc-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots - - false - - - true - - - - - - codemc-repo - https://repo.codemc.io/repository/maven-public/ - - true - - - true - - - - - - essentialsx-repo - https://repo.essentialsx.net/releases/ - - true - - - true - - - - - - dmulloy2-repo-releases - https://repo.dmulloy2.net/nexus/repository/releases/ - - true - - - false - - - - dmulloy2-repo-snapshots - https://repo.dmulloy2.net/nexus/repository/snapshots/ - - false - - - true - - - - - - maven-snapshots - https://s01.oss.sonatype.org/content/repositories/snapshots/ - - - - - onarandombox-repo-releases - https://repo.onarandombox.com/content/repositories/multiverse/ - - true - - - false - - - - onarandombox-repo-snapshots - https://repo.onarandombox.com/content/repositories/multiverse-snapshots/ - - false - - - true - - - - - - devmart-other - https://nexuslite.gcnt.net/repos/other/ - - - - opencollab-snapshot - https://repo.opencollab.dev/maven-snapshots/ - - false - - - true - - - - jitpack - https://jitpack.io/ - - true - - - false - - - - - - - - org.geysermc.floodgate - api - 2.2.2-SNAPSHOT - provided - - - - - ch.jalu - injector - 1.0 - true - - - - - net.ricecode - string-similarity - 1.0.0 - true - - - - - - com.maxmind.db - maxmind-db-gson - 2.0.3 - true - - - com.google.code.gson - gson - - - - - - - javatar - javatar - 2.5 - true - - - - - org.apache.commons - commons-email - 1.6-SNAPSHOT - true - - - - - org.apache.logging.log4j - log4j-core - 2.20.0 - provided - - - - - com.alessiodp.libby - libby-bukkit - 2.0.0-SNAPSHOT - compile - - - - - com.zaxxer - HikariCP - 4.0.3 - true - - - slf4j-api - org.slf4j - - - - - - org.slf4j - slf4j-simple - 1.7.36 - true - - - - - de.rtner - PBKDF2 - 1.1.4 - true - - - - - com.mysql - mysql-connector-j - 8.0.33 - true - - - org.mariadb.jdbc - mariadb-java-client - 3.3.3 - true - - - - - de.mkammerer - argon2-jvm-nolibs - 2.11 - true - - - - - com.warrenstrange - googleauth - 1.5.0 - true - - - - - org.spigotmc - spigot-api - ${spigot.version} - provided - - - junit - junit - - - com.googlecode.json-simple - json-simple - - - - - - com.google.guava - guava - 31.1-jre - true - - - org.checkerframework - checker-qual - - - - - - com.google.code.gson - gson - 2.10.1 - true - - - - - ch.jalu - configme - 1.3.1 - true - - - org.yaml - snakeyaml - - - - - - - org.bstats - bstats-bukkit - 3.0.2 - true - - - - - com.comphenix.protocol - ProtocolLib - 5.1.0 - provided - - - cglib-nodep - cglib - - - BukkitExecutors - com.comphenix.executors - - - byte-buddy - net.bytebuddy - - - - - - - net.kyori - adventure-text-minimessage - 4.17.0 - - - net.kyori - adventure-platform-bukkit - 4.3.2 - - - net.kyori - adventure-text-serializer-gson - 4.17.0 - - - - - net.luckperms - api - 5.4 - provided - - - - - ru.tehkode - PermissionsEx - 1.23.5-SNAPSHOT - provided - - - commons-dbcp - commons-dbcp - - - accounts-client - com.mojang - - - - - - - - - - - - - - - - - - - - - org.tyrannyofheaven.bukkit - zPermissions - 1.4.3-SNAPSHOT - provided - - - org.avaje - ebean - - - - - - - net.milkbowl.vault - VaultAPI - 1.7 - provided - - - org.bukkit - bukkit - - - org.bukkit - craftbukkit - - - - - - - com.onarandombox.multiversecore - Multiverse-Core - 4.3.1 - jar - provided - - - org.bukkit - bukkit - - - org.bukkit - craftbukkit - - - AllPay - com.fernferret.allpay - - - Vault - net.milkbowl.vault - - - VaultAPI - net.milkbowl.vault - - - CommandHandler - com.pneumaticraft.commandhandler - - - SerializationConfig - me.main__.util - - - Logging - com.dumptruckman.minecraft - - - metrics - org.mcstats.bukkit - - - buscript - com.dumptruckman.minecraft - - - junit - junit - - - spigot-api - org.spigotmc - - - jettison - org.codehaus.jettison - - - - - - - net.essentialsx - EssentialsX - 2.20.1 - provided - - - io.papermc - paperlib - - - org.bstats - bstats-bukkit - - - net.essentialsx - BaseProviders - - - net.essentialsx - PaperProvider - - - net.essentialsx - NMSReflectionProvider - - - net.essentialsx - 1_8Provider - - - net.essentialsx - 1_12Provider - - - org.spigotmc - spigot-api - - - org.spongepowered - configurate-yaml - - - org.checkerframework - checker-qual - - - - - - - at.favre.lib - bcrypt - 0.10.2 - true - - - - - de.luricos.bukkit - xAuth - 2.6.1-SNAPSHOT - provided - - - - ch.jalu - datasourcecolumns - 0.1.1-SNAPSHOT - true - - - - org.postgresql - postgresql - 42.7.3 - true - - - org.checkerframework - checker-qual - - - - - - - org.checkerframework - checker-qual - 3.40.0 - test - - - - - com.github.Anon8281 - UniversalScheduler - 0.1.6 - compile - - - - - org.xerial - sqlite-jdbc - 3.46.0.0 - test - - - com.h2database - h2 - 2.2.224 - provided - - - -