Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #115 from Shynixn/development
Browse files Browse the repository at this point in the history
Merge changes to master --release
  • Loading branch information
Shynixn authored Sep 22, 2023
2 parents e1881b5 + 2cd64e2 commit 761494a
Show file tree
Hide file tree
Showing 17 changed files with 993 additions and 23 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN java -jar BuildTools.jar --rev 1.18.2 --remapped
RUN java -jar BuildTools.jar --rev 1.19 --remapped
RUN java -jar BuildTools.jar --rev 1.19.3 --remapped
RUN java -jar BuildTools.jar --rev 1.19.4 --remapped
RUN java -jar BuildTools.jar --rev 1.20 --remapped
RUN java -jar BuildTools.jar --rev 1.20.1 --remapped
RUN java -jar BuildTools.jar --rev 1.20.2 --remapped

# 3. Build plugin for 1.8 - 1.17 with jdk17
FROM amazoncorretto:17 AS plugin-jdk17
Expand All @@ -47,7 +48,7 @@ RUN ./gradlew build pluginJar --no-daemon
# 4. Launch a minecraft server with jdk17 and plugin
FROM amazoncorretto:17
# Change to the current plugin version present in build.gradle
ENV PLUGIN_VERSION=2.11.0
ENV PLUGIN_VERSION=2.12.0
# Change to the server version you want to test.
ENV SERVER_VERSION=spigot-1.19.4.jar
# Port of the Minecraft Server.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-2022 Shynixn
Copyright (c) 2016-2024 Shynixn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ StructureBlockLib is a bukkit API and implementation for handling structures on
* API to save or load structures without an actual structure block.
* Asynchronous implementation and API.
* Fluent API.
* Version support 1.9.R1 - 1.20.R1
* Version support 1.9.R1 - 1.20.R2
* Java support 8 - Latest

## Installation
Expand All @@ -29,15 +29,15 @@ StructureBlockLib is a bukkit API and implementation for handling structures on
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-api</artifactId>
<version>2.11.0</version>
<version>2.12.0</version>
<scope>provided</scope>
</dependency>
```
**Gradle**

```xml
dependencies {
compileOnly("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.11.0")
compileOnly("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0")
}
```

Expand Down Expand Up @@ -271,8 +271,8 @@ structureBlock.update();
**plugin.yml**
```yaml
libraries:
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.11.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.11.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.12.0
```
### For version < 1.17
Expand All @@ -291,22 +291,22 @@ go with the option above instead. There are several tutorials on spigotmc.org.
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-api</artifactId>
<version>2.11.0</version>
<version>2.12.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-core</artifactId>
<version>2.11.0</version>
<version>2.12.0</version>
<scope>compile</scope>
</dependency>
```
**Gradle**

```xml
dependencies {
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.11.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.11.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.12.0")
}
```

Expand All @@ -316,7 +316,7 @@ dependencies {

* Install Java 17 or higher
* Fork the StructureBlockLib project on github and clone it to your local environment.
* StructureBlockLib requires spigot server implementations from 1.9.4 to 1.20 to be correctly installed in your local Maven cache.
* StructureBlockLib requires spigot server implementations from 1.9.4 to 1.20.2 to be correctly installed in your local Maven cache.
As this requires multiple java version to build different versions, a Dockerfile is provided to build these dependencies in a docker container
and then copy it to your local Maven cache.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks.register("printVersion") {

subprojects {
group 'com.github.shynixn.structureblocklib'
version '2.11.0'
version '2.12.0'

apply plugin: 'kotlin-platform-jvm'
apply plugin: 'signing'
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ include("structureblocklib-bukkit-core:bukkit-nms-119R1")
include("structureblocklib-bukkit-core:bukkit-nms-119R2")
include("structureblocklib-bukkit-core:bukkit-nms-119R3")
include("structureblocklib-bukkit-core:bukkit-nms-120R1")
include("structureblocklib-bukkit-core:bukkit-nms-120R2")
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,14 @@ public enum Version {
VERSION_1_19_R3("v1_19_R3", "1.19.4", 1.194),

/**
* Version 1.20 - 1.20.
* Version 1.20 - 1.20.1.
*/
VERSION_1_20_R1("v1_20_R1", "1.20.0", 1.20);
VERSION_1_20_R1("v1_20_R1", "1.20.0", 1.20),

/**
* Version 1.20.2 - 1.20.2.
*/
VERSION_1_20_R2("v1_20_R2", "1.20.2", 1.22);

private final String bukkitId;
private final String id;
Expand Down
11 changes: 10 additions & 1 deletion structureblocklib-bukkit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,21 @@ tasks.register("pluginJar", Exec::class.java, ) {
val targetJarFile = File(destinationDir, archiveName)

var obsMapping = createCommand(
"1.20-R0.1-SNAPSHOT",
"1.20.1-R0.1-SNAPSHOT",
"com/github/shynixn/structureblocklib/bukkit/v1_20_R1",
file,
shadowJar,
targetJarFile,
targetJarFile
)
obsMapping = "$obsMapping && " + createCommand(
"1.20.2-R0.1-SNAPSHOT",
"com/github/shynixn/structureblocklib/bukkit/v1_20_R2",
file,
shadowJar,
targetJarFile,
targetJarFile
)

if (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")) {
commandLine = listOf("cmd", "/c", obsMapping.replace("\$HOME", "%userprofile%"))
Expand Down Expand Up @@ -182,6 +190,7 @@ dependencies {
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-119R2"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-119R3"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R1"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R2"))

compileOnly("org.spigotmc:spigot:1.14.4-R0.1-SNAPSHOT")
testCompile("org.spigotmc:spigot:1.12-R0.1-SNAPSHOT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ dependencies {
implementation(project(":structureblocklib-api"))
implementation(project(":structureblocklib-core"))
implementation(project(":structureblocklib-bukkit-api"))
compileOnly("org.spigotmc:spigot:1.20-R0.1-SNAPSHOT:remapped-mojang")
testCompile("org.spigotmc:spigot:1.20-R0.1-SNAPSHOT:remapped-mojang")
compileOnly("org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:remapped-mojang")
testCompile("org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:remapped-mojang")
}
24 changes: 24 additions & 0 deletions structureblocklib-bukkit-core/bukkit-nms-120R2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repositories {
maven(url = "https://libraries.minecraft.net")
}

dependencies {
// Dependencies of spigot mojang want to restrict usage to only Java 17. However, we do not care
// what they want because the general compatibility of this plugin is Java 8. The plugin
// guarantees that everything works during runtime. This error is a false positive.
components {
all {
allVariants {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
}
}
}
}

implementation(project(":structureblocklib-api"))
implementation(project(":structureblocklib-core"))
implementation(project(":structureblocklib-bukkit-api"))
compileOnly("org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:remapped-mojang")
testCompile("org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:remapped-mojang")
}
Loading

0 comments on commit 761494a

Please sign in to comment.