Skip to content

Commit

Permalink
refactor: project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubxity committed Jul 27, 2021
1 parent e17244e commit 416c124
Show file tree
Hide file tree
Showing 49 changed files with 24 additions and 25 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,4 @@ jobs:
title: "Development Build"
files: |
api/build/libs/*.jar
bukkit/build/libs/*.jar
minestom/build/libs/*.jar
velocity/build/libs/*.jar
bungee/build/libs/*.jar
platforms/*/build/libs/*.jar
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ jobs:
prerelease: false
files: |
api/build/libs/*.jar
bukkit/build/libs/*.jar
minestom/build/libs/*.jar
velocity/build/libs/*.jar
bungee/build/libs/*.jar
platforms/*/build/libs/*.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $ ./gradlew shadowJar
To build a specific subproject, you can prefix it with the subproject path. For example:

```bash
$ ./gradlew :bukkit:shadowJar
$ `./gradlew :unifiedmetrics-platform-bukkit:shadowJar`
```

The output artifacts can be found in `subproject/build/libs`.
Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

dependencies {
api(project(":unifiedmetrics-common"))
implementation(project(":unifiedmetrics-influx-driver"))
implementation(project(":unifiedmetrics-prometheus-driver"))
implementation(project(":unifiedmetrics-driver-influx"))
implementation(project(":unifiedmetrics-driver-prometheus"))
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ tasks {
dependencies {
include(dependency(":unifiedmetrics-api"))
include(dependency(":unifiedmetrics-common"))
include(dependency(":unifiedmetrics-influx-driver"))
include(dependency(":unifiedmetrics-prometheus-driver"))
include(dependency(":unifiedmetrics-driver-influx"))
include(dependency(":unifiedmetrics-driver-prometheus"))
include(dependency(":unifiedmetrics-core"))
}
}
Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 17 additions & 12 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,31 @@
rootProject.name = "UnifiedMetrics"

val modulePrefix = ":unifiedmetrics-"
val platformPrefix = "platform-"
val driverPrefix = "driver-"

include(modulePrefix + "api")
include(modulePrefix + "common")
include(modulePrefix + "core")
include(modulePrefix + "bukkit")
include(modulePrefix + "velocity")
include(modulePrefix + "bungee")
include(modulePrefix + "minestom")

include(modulePrefix + "influx-driver")
include(modulePrefix + "prometheus-driver")
include(modulePrefix + platformPrefix + "bukkit")
include(modulePrefix + platformPrefix + "minestom")
include(modulePrefix + platformPrefix + "velocity")
include(modulePrefix + platformPrefix + "bungee")

include(modulePrefix + driverPrefix + "influx")
include(modulePrefix + driverPrefix + "prometheus")

project(modulePrefix + "api").projectDir = File(rootDir, "api")
project(modulePrefix + "common").projectDir = File(rootDir, "common")
project(modulePrefix + "core").projectDir = File(rootDir, "core")
project(modulePrefix + "bukkit").projectDir = File(rootDir, "bukkit")
project(modulePrefix + "velocity").projectDir = File(rootDir, "velocity")
project(modulePrefix + "bungee").projectDir = File(rootDir, "bungee")
project(modulePrefix + "minestom").projectDir = File(rootDir, "minestom")

val platformsDir = File(rootDir, "platforms")
project(modulePrefix + platformPrefix + "bukkit").projectDir = File(platformsDir, "bukkit")
project(modulePrefix + platformPrefix + "minestom").projectDir = File(platformsDir, "minestom")
project(modulePrefix + platformPrefix + "velocity").projectDir = File(platformsDir, "velocity")
project(modulePrefix + platformPrefix + "bungee").projectDir = File(platformsDir, "bungee")

val driversDir = File(rootDir, "drivers")
project(modulePrefix + "influx-driver").projectDir = File(driversDir, "influx")
project(modulePrefix + "prometheus-driver").projectDir = File(driversDir, "prometheus")
project(modulePrefix + driverPrefix + "influx").projectDir = File(driversDir, "influx")
project(modulePrefix + driverPrefix + "prometheus").projectDir = File(driversDir, "prometheus")

0 comments on commit 416c124

Please sign in to comment.