Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split common libraries to their own project #53

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env

This file was deleted.

2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Path to a local copy of hollow-cube/common. Required for now.
COMMON_LIB_PATH=../common
13 changes: 13 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
path: libmmo
- name: Set up libmmo env
working-directory: libmmo
run: cp .env.sample .env
- name: Checkout common project
uses: actions/checkout@v2
with:
repository: hollow-cube/common
path: common
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
- name: Grant execute permission for gradlew
working-directory: libmmo
run: chmod +x gradlew
- name: Setup gradle cache
uses: burrunan/gradle-cache-action@v1
Expand All @@ -30,6 +41,8 @@ jobs:
maven-local-ignore-paths: |
starlight/mmo/
- name: Build
working-directory: libmmo
run: ./gradlew classes testClasses
- name: Run tests
working-directory: libmmo
run: ./gradlew test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ bin/
!.github

log.txt

.env
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ todo

todo

## Using a local copy of `hollow-cube/common`
> Currently, this is the only option. When the libraries are properly versioned in the future this will be optional.

1. Ensure you have a local copy of `hollow-cube/common` on your machine.
2. Create a copy of the sample `.env` file in the root of this project, eg `cp .env.sample .env`.
3. Ensure `COMMON_LIB_PATH` points to the location of your local copy of `hollow-cube/common`.
4. Reload the gradle project.

# Project Structure

The project is split into a set of modules, each one representing a unique feature. The modules may be used
Expand Down
2 changes: 1 addition & 1 deletion modules/block-interactions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
implementation(project(":modules:common"))
implementation("net.hollowcube.common:common:0.0.0")
implementation(project(":modules:item"))
implementation(project(":modules:loot-table"))
implementation(project(":modules:player"))
Expand Down
2 changes: 1 addition & 1 deletion modules/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ subprojects {
implementation("com.github.minestommmo:Minestom:c6c97162a6")

// Testing
testImplementation(project(":modules:test"))
testImplementation("net.hollowcube.common:test:0.0.0")
}

tasks.getByName<Test>("test") {
Expand Down
2 changes: 1 addition & 1 deletion modules/chat/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
implementation(project(":modules:common"))
implementation("net.hollowcube.common:common:0.0.0")

implementation("org.mongodb:mongodb-driver-sync:4.7.0")
}
Expand Down
11 changes: 0 additions & 11 deletions modules/common/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions modules/common/build.gradle.kts

This file was deleted.

28 changes: 0 additions & 28 deletions modules/common/src/main/java/net/hollowcube/Env.java

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions modules/common/src/main/java/net/hollowcube/data/NumberSource.java

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions modules/common/src/main/java/net/hollowcube/dfu/DFUUtil.java

This file was deleted.

Loading