mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-21 01:01:35 +08:00
Remove BuildTools script and update README
This commit is contained in:
parent
baab65d776
commit
25c7ebcf39
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -28,9 +28,6 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Run BuildTools
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: chmod +x scripts/buildtools.sh && ./scripts/buildtools.sh
|
||||
- name: Build with Maven
|
||||
run: mvn package --file pom.xml
|
||||
- name: Copy artifacts
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,4 +15,5 @@
|
||||
|
||||
# Build files
|
||||
target/
|
||||
jars/
|
||||
jars/
|
||||
out/
|
17
README.md
17
README.md
@ -1,4 +1,4 @@
|
||||
[![EssentialsX](https://i.imgur.com/CP4SZpB.png)](https://essentialsx.github.io)
|
||||
[![EssentialsX](https://i.imgur.com/CP4SZpB.png)](https://essentialsx.cf)
|
||||
|
||||
[<img alt="Jenkins" src="https://img.shields.io/badge/-Download_from_Jenkins-D24939.svg?logo=jenkins&style=flat-square&logoColor=white" height=32>](http://ci.ender.zone/job/EssentialsX/)
|
||||
|
||||
@ -40,16 +40,8 @@ If you need to report a bug or want to suggest a new feature, you can [open an i
|
||||
Building
|
||||
--------
|
||||
|
||||
EssentialsX builds against the Spigot/CraftBukkit server software for legacy support.
|
||||
|
||||
To compile EssentialsX, you first need to run [BuildTools](https://www.spigotmc.org/wiki/buildtools).
|
||||
This only needs to be done once. There are two ways to do this:
|
||||
|
||||
* Use the provided script at `scripts/buildtools.sh` to automatically download and run BuildTools if needed.
|
||||
* Download and run BuildTools yourself for versions `1.8` and `1.8.3`.
|
||||
|
||||
Next, to build EssentialsX with Maven, run the following command:
|
||||
```
|
||||
To build EssentialsX, you need JDK 8 or higher and Maven installed on your system. Then, run the following command:
|
||||
```sh
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
@ -58,7 +50,8 @@ Each module's jar can be found in `target/` inside each module's directory.
|
||||
Using EssentialsX in your plugin
|
||||
--------------------------------
|
||||
|
||||
Writing a plugin and want to support EssentialsX? We have a Maven repository at https://ci.ender.zone/plugin/repository/everything/, and the EssentialsX artifact is `net.ess3:EssentialsX:2.17.0`. More information at the [wiki](https://github.com/EssentialsX/Essentials/wiki/Common-Issues#how-do-i-add-essentialsx-as-a-dependency).
|
||||
Do you want to integrate with EssentialsX in your plugin? EssentialsX is available on the **ender.zone Maven repository** at https://ci.ender.zone/plugin/repository/everything/, and the EssentialsX artifact is `net.ess3:EssentialsX:2.17.2`.
|
||||
More information at the [wiki](https://github.com/EssentialsX/Essentials/wiki/Common-Issues#how-do-i-add-essentialsx-as-a-dependency).
|
||||
|
||||
|
||||
Contributing
|
||||
|
@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir -p .buildtools
|
||||
pushd .buildtools
|
||||
|
||||
is_installed() {
|
||||
mvn dependency:get -q -Dartifact=$1 -DremoteRepositories=file://$HOME/.m2/repository 1>/dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
ensure_buildtools() {
|
||||
if [ ! -f "BuildTools.jar" ]; then
|
||||
echo "Downloading BuildTools..."
|
||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "msys"* ]]; then
|
||||
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o BuildTools.jar
|
||||
else
|
||||
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
run_buildtools() {
|
||||
ensure_buildtools
|
||||
# Check if env var isnt empty, then run with xmx flag
|
||||
if [ ! -z "$BUILDTOOLS_XMX" ]; then
|
||||
echo "BUILDTOOLS_XMX Environment variable found. Running BuildTools with -Xmx$BUILDTOOLS_XMX"
|
||||
java -Xmx$BUILDTOOLS_XMX -jar BuildTools.jar --rev $1
|
||||
else
|
||||
java -jar BuildTools.jar --rev $1
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Running BuildTools for CB $1 failed! Aborting."
|
||||
popd
|
||||
exit 255
|
||||
else
|
||||
echo "Successfully built version $1"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check CB 1.8
|
||||
is_installed org.bukkit:craftbukkit:1.8-R0.1-SNAPSHOT
|
||||
is_18=$? # 0 = present, 1 = not present
|
||||
|
||||
# Check CB 1.8.3
|
||||
is_installed org.bukkit:craftbukkit:1.8.3-R0.1-SNAPSHOT
|
||||
is_183=$?
|
||||
|
||||
if [ $is_18 -ne 0 ]; then
|
||||
echo "Installing CraftBukkit 1.8..."
|
||||
run_buildtools 1.8
|
||||
else
|
||||
echo "CraftBukkit 1.8 installed; skipping BuildTools..."
|
||||
fi
|
||||
|
||||
if [ $is_183 -ne 0 ]; then
|
||||
echo "Installing CraftBukkit 1.8.3..."
|
||||
run_buildtools 1.8.3
|
||||
else
|
||||
echo "CraftBukkit 1.8.3 installed; skipping BuildTools..."
|
||||
fi
|
||||
|
||||
popd
|
Loading…
Reference in New Issue
Block a user