Skip to content

Commit

Permalink
Merge branch 'dev/0.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubxity committed Sep 25, 2022
2 parents 4a6e0d0 + 877660d commit 4beba9f
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 93 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Configure GPG Key
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
Expand All @@ -35,11 +35,11 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Configure GPG Key
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Configure GPG Key
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
Expand All @@ -34,11 +34,11 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Configure GPG Key
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
Expand Down
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
UnifiedMetrics is a fully-featured free and open-source metrics collection plugin for Minecraft servers. This project is
licensed under [GNU LGPLv3](COPYING.LESSER).

[![Grafana Dashboard](.github/assets/grafana.png)](https://dedimc.link/unifiedmetrics)
[![Grafana Dashboard](.github/assets/grafana.png)](https://unifiedmetrics-demo.cubxity.dev)
*Dashboard [included](https://github.com/Cubxity/UnifiedMetrics/wiki/Grafana) out-of-box!*
Click [here](https://dedimc.link/unifiedmetrics) for live preview!
Click [here](https://unifiedmetrics-demo.cubxity.dev) for live preview!

## Features

Expand Down Expand Up @@ -44,25 +44,26 @@ Read the [wiki](https://github.com/Cubxity/UnifiedMetrics/wiki) for instructions
<details>
<summary>Table of metrics (click to show)</summary>

| Collector | Description | Platform | Default |
| ------------- | ----------------------------------------------- | ------------------- | ------- |
| systemGc | Garbage collection duration and freed bytes | All | true |
| systemMemory | Memory used, committed, max and init | All | true |
| systemProcess | CPU load, seconds, and process start time | All | true |
| systemThread | Current, daemon, started, and peak thread count | All | true |
| events | Login, join, quit, chat, and ping event counter | All | true |
| server | Plugins count and player counts | All | true |
| tick | Tick duration histogram | Bukkit, Minestom | true |
| world | World entities, players, and chunks count | Bukkit, Minestom | true |
| Collector | Description | Platform | Default |
|---------------|-------------------------------------------------|------------------|---------|
| systemGc | Garbage collection duration and freed bytes | All | true |
| systemMemory | Memory used, committed, max and init | All | true |
| systemProcess | CPU load, seconds, and process start time | All | true |
| systemThread | Current, daemon, started, and peak thread count | All | true |
| events | Login, join, quit, chat, and ping event counter | All | true |
| server | Plugins count and player counts | All | true |
| tick | Tick duration histogram | Bukkit, Minestom | true |
| world | World entities, players, and chunks count | Bukkit, Minestom | true |

</details>

## Special Thanks

UnifiedMetrics is a proud partner of [DedicatedMC](https://dedimc.promo/UnifiedMetrics)! Get your Raw Power Hosting
today with **15% OFF** using code `UnifiedMetrics`!
[Bloom Host](https://billing.bloom.host/aff.php?aff=9) has kindly provided UnifiedMetrics with development servers.
Bloom has server splitting built-in, which makes it extremely easy to build your monitoring stack. Get high performance
servers at Bloom by using [this link](https://billing.bloom.host/aff.php?aff=9).

[![DedicatedMC Logo](.github/assets/dmc.png)](https://dedimc.promo/UnifiedMetrics)
[![Bloom logo](https://billing.bloom.host/templates/lagom/assets/img/logo/logo_big_inverse.svg)](https://billing.bloom.host/aff.php?aff=9)

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET
applications. YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/),
Expand Down Expand Up @@ -136,7 +137,7 @@ Example plugins can be found under [examples](examples) directory.
```kotlin
repositories {
mavenCentral()

// Snapshots repository (only required for -SNAPSHOT versions)
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
Expand All @@ -145,7 +146,7 @@ repositories {
```kotlin
dependencies {
// Replace this with the desired version
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.3")
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.6")
}
```

Expand Down
4 changes: 2 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
dependencies {
api(platform(kotlin("bom")))
api(kotlin("stdlib"))
api("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.6.0")
api("org.jetbrains.kotlinx", "kotlinx-serialization-core", "1.3.2")
api("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.6.4")
api("org.jetbrains.kotlinx", "kotlinx-serialization-core", "1.4.0")
}

java {
Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.6.20" apply false
kotlin("kapt") version "1.6.20" apply false
kotlin("plugin.serialization") version "1.6.20" apply false
kotlin("jvm") version "1.7.10" apply false
kotlin("kapt") version "1.7.10" apply false
kotlin("plugin.serialization") version "1.7.10" apply false
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("net.kyori.blossom") version "1.3.0" apply false
id("net.kyori.blossom") version "1.3.1" apply false
}

allprojects {
group = "dev.cubxity.plugins"
description = "Fully featured metrics collector agent for Minecraft servers."
version = "0.3.6"
version = "0.3.7"

repositories {
mavenCentral()
Expand All @@ -44,7 +44,7 @@ subprojects {
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
}
}
configure<JavaPluginExtension> {
Expand Down
4 changes: 2 additions & 2 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ apply(plugin = "kotlinx-serialization")

dependencies {
api(project(":unifiedmetrics-api"))
implementation("com.charleskorn.kaml", "kaml", "0.43.0")
}
implementation("com.charleskorn.kaml:kaml:0.48.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ abstract class AbstractUnifiedMetricsPlugin : UnifiedMetricsPlugin {
Files.createDirectories(bootstrap.configDirectory)

_config = loadConfig()
_apiProvider = UnifiedMetricsApiProvider(this)

try {
saveConfig()
} catch (exception: Exception) {
apiProvider.logger.severe("An error occurred whilst saving plugin config file", exception)
}

_apiProvider = UnifiedMetricsApiProvider(this)
UnifiedMetricsProvider.register(apiProvider)
registerPlatformService(apiProvider)

Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies {
api(project(":unifiedmetrics-common"))
implementation(project(":unifiedmetrics-driver-influx"))
implementation(project(":unifiedmetrics-driver-prometheus"))
}
}
4 changes: 2 additions & 2 deletions drivers/influx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ apply(plugin = "kotlinx-serialization")

dependencies {
compileOnly(project(":unifiedmetrics-api"))
api("com.influxdb", "influxdb-client-java", "5.0.0")
}
api("com.influxdb:influxdb-client-java:6.5.0")
}
6 changes: 3 additions & 3 deletions drivers/prometheus/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ apply(plugin = "kotlinx-serialization")

dependencies {
compileOnly(project(":unifiedmetrics-api"))
api("io.prometheus", "simpleclient_httpserver", "0.15.0")
api("io.prometheus", "simpleclient_pushgateway", "0.15.0")
}
api("io.prometheus:simpleclient_httpserver:0.16.0")
api("io.prometheus:simpleclient_pushgateway:0.16.0")
}
12 changes: 1 addition & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,4 @@
# along with UnifiedMetrics. If not, see <https://www.gnu.org/licenses/>.
#

# Workaround for https://youtrack.jetbrains.com/issue/KT-45545
kapt.use.worker.api=false
org.gradle.jvmargs=-Dfile.encoding=UTF-8 \
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx2G
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
56 changes: 21 additions & 35 deletions platforms/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,37 @@
*/

plugins {
id("fabric-loom") version "0.9.9"
id("fabric-loom") version "1.0.8"
id("net.kyori.blossom")
}

val transitiveInclude: Configuration by configurations.creating {
exclude(group = "com.mojang")
exclude(group = "org.jetbrains.kotlin")
exclude(group = "org.jetbrains.kotlinx")
}

dependencies {
// https://fabricmc.net/versions.html
minecraft("com.mojang:minecraft:1.17.1")
mappings("net.fabricmc:yarn:1.17.1+build.61:v2")
modImplementation("net.fabricmc:fabric-loader:0.11.7")
mappings("net.fabricmc:yarn:1.17.1+build.65:v2")
modImplementation("net.fabricmc:fabric-loader:0.14.9")

modImplementation("net.fabricmc.fabric-api:fabric-api:0.40.1+1.17")
modImplementation("net.fabricmc:fabric-language-kotlin:1.7.1+kotlin.1.6.10")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.62.0+1.19.2")
modImplementation("net.fabricmc:fabric-language-kotlin:1.8.3+kotlin.1.7.10")

api(project(":unifiedmetrics-core"))

include(project(":unifiedmetrics-core"))
include(project(":unifiedmetrics-common"))
include("com.charleskorn.kaml:kaml:0.43.0")
include("com.charleskorn.kaml:kaml-jvm:0.43.0")
include("org.snakeyaml:snakeyaml-engine:2.3")
include(project(":unifiedmetrics-api"))
include(project(":unifiedmetrics-driver-influx"))
include("com.influxdb:influxdb-client-java:5.0.0")
include("com.influxdb:influxdb-client-core:5.0.0")
include("com.influxdb:influxdb-client-utils:5.0.0")
include("com.google.code.findbugs:jsr305:3.0.2")
include("com.squareup.retrofit2:retrofit:2.9.0")
include("com.squareup.okhttp3:okhttp:4.7.2")
include("com.squareup.okio:okio:2.6.0")
include("com.squareup.okhttp3:logging-interceptor:4.7.2")
include("org.apache.commons:commons-csv:1.8")
include("io.reactivex.rxjava2:rxjava:2.2.19")
include("org.reactivestreams:reactive-streams:1.0.3")
include("io.swagger:swagger-annotations:1.6.1")
include("io.gsonfire:gson-fire:1.8.4")
include("com.squareup.retrofit2:converter-scalars:2.9.0")
include("com.squareup.retrofit2:converter-gson:2.9.0")
include(project(":unifiedmetrics-driver-prometheus"))
include("io.prometheus:simpleclient_httpserver:0.15.0")
include("io.prometheus:simpleclient:0.14.1")
include("io.prometheus:simpleclient_tracer_otel:0.15.0")
include("io.prometheus:simpleclient_tracer_common:0.15.0")
include("io.prometheus:simpleclient_tracer_otel_agent:0.15.0")
include("io.prometheus:simpleclient_common:0.15.0")
include("io.prometheus:simpleclient_pushgateway:0.15.0")
transitiveInclude(project(":unifiedmetrics-core"))

transitiveInclude.incoming.artifacts.forEach {
val dependency: Any = when (val component = it.id.componentIdentifier) {
is ProjectComponentIdentifier -> project(component.projectPath)
else -> component.toString()
}

include(dependency)
}
}

loom {
Expand Down
2 changes: 1 addition & 1 deletion platforms/minestom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
api(project(":unifiedmetrics-core"))

compileOnly("com.github.Minestom:Minestom:2e02dfd4d8")
testImplementation("com.github.Minestom:Minestom:2e02dfd4d8")
testImplementation("com.github.Minestom:Minestom:4a79a3af26")
}

java {
Expand Down
6 changes: 3 additions & 3 deletions platforms/velocity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ plugins {
}

repositories {
maven("https://nexus.velocitypowered.com/repository/maven-public/")
maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
api(project(":unifiedmetrics-core"))

compileOnly("com.velocitypowered:velocity-api:3.1.0")
kapt("com.velocitypowered:velocity-api:3.1.0")
compileOnly("com.velocitypowered:velocity-api:3.1.1")
kapt("com.velocitypowered:velocity-api:3.1.1")
}

tasks {
Expand Down
19 changes: 19 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"packageRules": [
{
"matchPackagePatterns": [
"*"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
}
]
}

0 comments on commit 4beba9f

Please sign in to comment.