Skip to content
Closed
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
34 changes: 0 additions & 34 deletions .github/workflows/gradle.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: release.yml
on:
push:
tags:
- "v*"

jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write # Essential for creating the release

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for changelog generation to see history

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Make Gradle Wrapper Executable
run: chmod +x ./gradlew
- name: Build Shaded JARs
run: ./gradlew clean shadowJar
- name: Remove Unshaded JAR
run: rm build/target/BlueBridgeCore-*-NoDependencies.jar
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
build/target/BlueBridgeCore-*.jar
build/target/BlueBridgeGP-*.jar
build/target/BlueBridgeWG-*.jar
build/target/BlueBridgeWB-*.jar
14 changes: 2 additions & 12 deletions BlueBridgeCore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.0'
}
}

plugins {
id 'com.gradleup.shadow' version '8.3.0'
}


dependencies {
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.6.2'
compileOnly 'de.bluecolored:bluemap-api:2.7.7'
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
implementation 'org.apache.commons:commons-text:1.9'
implementation 'org.apache.commons:commons-text:1.15.0'
}

tasks.build.dependsOn tasks.shadowJar
Expand Down
1 change: 0 additions & 1 deletion BlueBridgeCore/settings.gradle

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.bukkit.configuration.file.FileConfiguration;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -53,6 +52,10 @@ public synchronized Color defaultOutlineColor() {
return new Color("#" + rgb);
}

public synchronized int defaultOutlineWidth() {
return config.getInt("defaultOutlineWidth", 2);
}

public synchronized String markerSetName() {
return config.getString("markerSetName", "Undefined (Check BlueBridge addon config)");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ private void addToMarkerSet(MarkerSet ms, RegionSnapshot rs, Shape shape, Vector
.label(StringEscapeUtils.escapeHtml4(rs.getShortName()))
.detail(rs.getHtmlDisplay())
.lineColor(rs.getBorderColor())
.lineWidth(rs.getOutlineWidth())
.fillColor(rs.getColor())
.depthTestEnabled(rs.getDepthCheck())
.build();
Expand All @@ -116,6 +117,7 @@ private void addToMarkerSet(MarkerSet ms, RegionSnapshot rs, Shape shape, Vector
.label(StringEscapeUtils.escapeHtml4(rs.getShortName()))
.detail(rs.getHtmlDisplay())
.lineColor(rs.getBorderColor())
.lineWidth(rs.getOutlineWidth())
.fillColor(rs.getColor())
.depthTestEnabled(rs.getDepthCheck())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class RegionSnapshot {
private List<Vector2d> points;
private Color color = new Color(0, 0, 0);
private Color borderColor = new Color(0, 0, 0);
private int outlineWidth = 2;
private double minDistance;
private double maxDistance;

Expand Down Expand Up @@ -81,6 +82,10 @@ public Color getBorderColor() {
return borderColor;
}

public int getOutlineWidth() {
return outlineWidth;
}

public double getMinDistance() {
return minDistance;
}
Expand Down Expand Up @@ -126,6 +131,10 @@ public void setBorderColor(Color borderColor) {
this.borderColor = borderColor;
}

public void setOutlineWidth(int outlineWidth) {
this.outlineWidth = outlineWidth;
}

public void setMinDistance(double minDistance) {
this.minDistance = minDistance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private void prefillDefaults() {
region.setDepthCheck(cfg.defaultDepthCheck());
region.setColor(cfg.defaultColor());
region.setBorderColor(cfg.defaultOutlineColor());
region.setOutlineWidth(cfg.defaultOutlineWidth());
region.setMinDistance(cfg.minDistance());
region.setMaxDistance(cfg.maxDistance());

Expand Down Expand Up @@ -75,6 +76,11 @@ public RegionSnapshotBuilder setBorderColor(Color color) {
return this;
}

public RegionSnapshotBuilder setOutlineWidth(int outlineWidth) {
region.setOutlineWidth(outlineWidth);
return this;
}

public RegionSnapshotBuilder setMinDistance(double minDistance) {
region.setMinDistance(minDistance);
return this;
Expand Down
2 changes: 2 additions & 0 deletions BlueBridgeCore/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ maxDistance: -1
defaultColor: "0087ff96"
defaultOutlineColor: "0060ff"

defaultOutlineWidth: 2

# Uncomment this section to exclude BlueMap maps from rendering regions.
# You can also add this list to the addon configs to block only their regions from appearing on a map. The two lists (addon specific and BlueBridgeCore) will be merged.
# excludedMaps:
Expand Down
38 changes: 35 additions & 3 deletions BlueBridgeGP/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
plugins {
id 'com.gradleup.shadow' version '8.3.0'
}

dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.6.2'
implementation 'com.github.TechFortress:GriefPrevention:16.18'
compileOnly project(':BlueBridgeCore')
compileOnly 'de.bluecolored:bluemap-api:2.7.7'
compileOnly 'com.github.GriefPrevention:GriefPrevention:16.18.5'
}

tasks.build.dependsOn tasks.shadowJar

jar {
archiveClassifier = 'NoDependencies'
}

shadowJar {
zip64 = true
mergeServiceFiles()
relocate 'org.apache.commons.text', 'de.mark225.shadow.org.apache.commons.text'
relocate 'org.apache.commons.lang3', 'de.mark225.shadow.org.apache.commons.lang3'
archiveClassifier = ''
def exclude_modules = project
.configurations
.provided
.resolvedConfiguration
.getLenientConfiguration()
.getAllModuleDependencies()
.collect {
it.name
}
dependencies {
exclude(dependency {
exclude_modules.contains(it.name)
})
}
}
2 changes: 0 additions & 2 deletions BlueBridgeGP/settings.gradle

This file was deleted.

36 changes: 34 additions & 2 deletions BlueBridgeWB/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
plugins {
id 'com.gradleup.shadow' version '8.3.0'
}

dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.6.2'
compileOnly project(':BlueBridgeCore')
compileOnly 'de.bluecolored:bluemap-api:2.7.7'
}

tasks.build.dependsOn tasks.shadowJar

jar {
archiveClassifier = 'NoDependencies'
}

shadowJar {
zip64 = true
mergeServiceFiles()
relocate 'org.apache.commons.text', 'de.mark225.shadow.org.apache.commons.text'
relocate 'org.apache.commons.lang3', 'de.mark225.shadow.org.apache.commons.lang3'
archiveClassifier = ''
def exclude_modules = project
.configurations
.provided
.resolvedConfiguration
.getLenientConfiguration()
.getAllModuleDependencies()
.collect {
it.name
}
dependencies {
exclude(dependency {
exclude_modules.contains(it.name)
})
}
}
38 changes: 35 additions & 3 deletions BlueBridgeWG/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
plugins {
id 'com.gradleup.shadow' version '8.3.0'
}

repositories {
maven { url "https://maven.enginehub.org/repo/" }
}

dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.6.2'
provided 'com.sk89q.worldguard:worldguard-bukkit:7.0.14'
compileOnly project(':BlueBridgeCore')
compileOnly 'de.bluecolored:bluemap-api:2.7.7'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.14'
}

tasks.build.dependsOn tasks.shadowJar

jar {
archiveClassifier = 'NoDependencies'
}

shadowJar {
zip64 = true
mergeServiceFiles()
relocate 'org.apache.commons.text', 'de.mark225.shadow.org.apache.commons.text'
relocate 'org.apache.commons.lang3', 'de.mark225.shadow.org.apache.commons.lang3'
archiveClassifier = ''
def exclude_modules = project
.configurations
.provided
.resolvedConfiguration
.getLenientConfiguration()
.getAllModuleDependencies()
.collect {
it.name
}
dependencies {
exclude(dependency {
exclude_modules.contains(it.name)
})
}
}
2 changes: 0 additions & 2 deletions BlueBridgeWG/settings.gradle

This file was deleted.

Loading