Skip to content

Commit

Permalink
Make the project compilable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazzuk committed Sep 29, 2024
1 parent a0e29eb commit 07717e4
Show file tree
Hide file tree
Showing 15 changed files with 446 additions and 73 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Java CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle Wrapper
run: ./gradlew shadowJar -x test --no-daemon
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Cloudburst
path: server/build/libs/
31 changes: 0 additions & 31 deletions .github/workflows/maven.yml

This file was deleted.

83 changes: 54 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

# Created by https://www.gitignore.io/api/java,maven,eclipse,netbeans,intellij+all
# Edit at https://www.gitignore.io/?templates=java,maven,eclipse,netbeans,intellij+all
# Created by https://www.toptal.com/developers/gitignore/api/java,maven,eclipse,netbeans,intellij+all,gradle
# Edit at https://www.toptal.com/developers/gitignore?templates=java,maven,eclipse,netbeans,intellij+all,gradle

### Eclipse ###
.metadata
Expand Down Expand Up @@ -53,26 +52,21 @@ local.properties

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

### Eclipse Patch ###
# Eclipse Core
.project

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Annotation Processing
.apt_generated

### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
Expand All @@ -82,6 +76,9 @@ local.properties
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

Expand All @@ -102,6 +99,9 @@ local.properties
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
Expand Down Expand Up @@ -129,6 +129,9 @@ atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
Expand All @@ -142,20 +145,13 @@ fabric.properties
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

*.iml
modules.xml
.idea/misc.xml
*.ipr
.idea/*

# Sonarlint plugin
.idea/sonarlint
!.idea/codeStyles
!.idea/runConfigurations

### Java ###
# Compiled class file
Expand All @@ -181,6 +177,7 @@ modules.xml

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Maven ###
target/
Expand All @@ -192,8 +189,15 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### NetBeans ###
**/nbproject/private/
**/nbproject/Makefile-*.mk
Expand All @@ -204,13 +208,34 @@ dist/
nbdist/
.nb-gradle/

# End of https://www.gitignore.io/api/java,maven,eclipse,netbeans,intellij+all
### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
# JDT-specific (Eclipse Java Development Tools)

### Gradle Patch ###
# Java heap dump
*.hprof

# Jrebel
rebel.xml
rebel-remote.xml
# End of https://www.toptal.com/developers/gitignore/api/java,maven,eclipse,netbeans,intellij+all,gradle

# Nukkit generated files
# Cloudburst generated files
banned-ips.json
banned-players.json
cloudburst.yml
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Build JAR file
-------------

- `git clone https://github.com/CloudburstMC/Cloudburst.git`
- `cd Server`
- `cd Cloudburst`
- `git submodule update --init`
- `./mvnw clean package`
- `./gradlew shadowJar`

The compiled JAR can be found in the `target/` directory.
The compiled JAR can be found in the `build/libs` directory.

Running
-------------
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fastutil-reference-reference-maps = { group = "org.cloudburstmc.fastutil.maps",
fastutil-short-sets = { group = "org.cloudburstmc.fastutil.sets", name = "short-sets", version.ref = "fastutil" }
fastutil-short-object-maps = { group = "org.cloudburstmc.fastutil.maps", name = "short-object-maps", version.ref = "fastutil" }

bedrock-connection = { group = "org.cloudburstmc.protocol", name = "bedrock-connection", version = "3.0.0.Beta1-SNAPSHOT" }
block-state-updater = { group = "org.cloudburstmc", name = "block-state-updater", version = "1.19.80-SNAPSHOT" }
bedrock-connection = { group = "org.cloudburstmc.protocol", name = "bedrock-connection", version = "3.0.0.Beta5-20240916.181041-6" }
block-state-updater = { group = "org.cloudburstmc", name = "block-state-updater", version = "1.21.30-SNAPSHOT" }
jopt-simple = { group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.4" }
leveldb-mcpe-jni = { group = "net.daporkchop", name = "leveldb-mcpe-jni", version = "0.0.10-SNAPSHOT" }
noise = { group = "net.daporkchop.lib", name = "noise", version = "0.5.6-SNAPSHOT" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 07717e4

Please sign in to comment.