Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyCloudCraft committed Nov 17, 2024
1 parent cd54b8f commit b1ce6ad
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 89 deletions.
33 changes: 16 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,22 @@ plugins {
id 'java'
id 'jacoco'
id 'base'
id 'maven-publish'
}

java {
sourceCompatibility = JavaVersion.toVersion(project.javaVersion)
targetCompatibility = JavaVersion.toVersion(project.javaVersion)
}
/* ext { // Dependency versions
SpigotAPI = "1.21.3-R0.1-SNAPSHOT"
AuthLib = "1.5.26"
WorldEdit = "7.3.6-SNAPSHOT"
FAWE = "2.12.0"
VaultAPI = "1.7.1"
PlaceholderAPI = "2.11.6"
Lombok = "1.18.34"
CommonsIO = "2.17.0"
Minimessage = "4.17.0"
SnakeYAML = "2.3"
} */
base {
archivesName = "${project.pluginname}"
}


repositories {
mavenCentral()
maven { url "https://jitpack.io" }
//maven { url "https://libraries.minecraft.net" }
//maven { url "https://hub.spigotmc.org/nexus/content/repositories/public/" }
// Plugin repositories
maven { url "https://repo.extendedclip.com/content/repositories/placeholderapi/" }
//maven { url "https://ci.athion.net/job/FastAsyncWorldEdit/ws" }
maven { url "https://maven.enginehub.org/repo/" }
}

Expand Down Expand Up @@ -71,7 +56,6 @@ dependencies {
}

processResources {
//project.properties.put("version", this.version) // Add version to properties
expand project.properties // Replace placeholders in resources
from(sourceSets.main.resources.srcDirs) {
include 'plugin.yml' // Ensure plugin.yml is included
Expand Down Expand Up @@ -122,6 +106,21 @@ test {
ignoreFailures = false
}

publishing {
publications {
customLibrary(MavenPublication) {
from components.java
}
}

repositories {
maven {
name = "${project.pluginname}"
url = layout.buildDirectory.dir("repo")
}
}
}

tasks.build.dependsOn tasks.shadowJar

defaultTasks 'build'
40 changes: 20 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Welcome, in this file you can set the variables for the builder and plugin.yml

javaVersion = 21
group = de.butzlabben
pluginname = WorldSystem
authors = [Butzlabben, Trainerlord, Cycodly]
version = 2.4.39
description = WorldSystem plugin to create per player worlds
apiversion = 1.21
minecraft = 1.21.3
depend = [WorldEdit]
softdepend = [PlaceholderAPI, Vault]
javaVersion=21
group=de.butzlabben
pluginname=WorldSystem
authors=[Butzlabben, Trainerlord, Cycodly]
version=2.4.39
description=WorldSystem plugin to create per player worlds
apiversion=1.21
minecraft=1.21.3
depend=[WorldEdit]
softdepend=[PlaceholderAPI, Vault]

# Dependencies
SpigotAPI = 1.21.3-R0.1-SNAPSHOT
AuthLib = 1.5.26
WorldEdit = 7.3.6-SNAPSHOT
FAWE = 2.12.0
VaultAPI = 1.7.1
PlaceholderAPI = 2.11.6
Lombok = 1.18.34
CommonsIO = 2.17.0
Minimessage = 4.17.0
SnakeYAML = 2.3
SpigotAPI=1.21.3-R0.1-SNAPSHOT
AuthLib=1.5.26
WorldEdit=7.3.6-SNAPSHOT
FAWE=2.12.0
VaultAPI=1.7.1
PlaceholderAPI=2.11.6
Lombok=1.18.34
CommonsIO=2.17.0
Minimessage=4.17.0
SnakeYAML=2.3
80 changes: 28 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,22 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>gradle.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<groupId>${group}</groupId>
<artifactId>${pluginname}</artifactId>
<version>${version}</version>
<groupId>de.butzlabben</groupId>
<artifactId>WorldSystem</artifactId>
<version>2.4.39</version>

<properties>
<maven.compiler.source>${javaVersion}</maven.compiler.source>
<maven.compiler.target>${javaVersion}</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<pluginname>WorldSystem</pluginname>
<group>${group}</group>
<authors>[Butzlabben, Trainerlord, Cycodly]</authors>
<description>WorldSystem plugin to create per player worlds</description>
<apiversion>1.21</apiversion>
<minecraft>1.21.3</minecraft>
<depend>[WorldEdit]</depend>
<softdepend>[PlaceholderAPI, Vault]</softdepend>
</properties>

<repositories>
Expand All @@ -57,7 +42,7 @@
<dependency>
<groupId>com.intellectualsites.bom</groupId> <!-- https://github.com/IntellectualSites/bom -->
<artifactId>bom-newest</artifactId>
<version>1.41</version>
<version>1.50</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand All @@ -69,92 +54,92 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${project.SnakeYAML}</version>
<version>2.3</version>
</dependency>

<!-- Adventure API for text formatting -->
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>${project.Minimessage}</version>
<version>4.17.0</version>
</dependency>

<!-- Lombok for code generation -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${project.Lombok}</version>
<version>1.18.34</version>
<scope>provided</scope> <!-- compileOnly in Gradle entspricht 'provided' in Maven -->
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${project.Lombok}</version>
<version>1.18.34</version>
<scope>test</scope> <!-- für Test-Annotation-Processing -->
</dependency>

<!-- Commons IO library -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${project.CommonsIO}</version>
<version>2.17.0</version>
</dependency>

<!-- Compile-only dependencies -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>${project.PlaceholderAPI}</version>
<version>2.11.6</version>
<scope>provided</scope> <!-- compileOnly in Gradle entspricht 'provided' in Maven -->
</dependency>

<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>${project.VaultAPI}</version>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>${project.AuthLib}</version>
<version>1.5.26</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${project.SpigotAPI}</version>
<version>1.21.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>${project.WorldEdit}</version>
<version>7.3.6-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-core</artifactId>
<version>${project.WorldEdit}</version>
<version>7.3.6-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fastasyncworldedit</groupId>
<artifactId>FastAsyncWorldEdit-Bukkit</artifactId>
<version>${project.FAWE}</version>
<version>2.12.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fastasyncworldedit</groupId>
<artifactId>FastAsyncWorldEdit-Core</artifactId>
<version>${project.FAWE}</version>
<version>2.12.0</version>
<scope>provided</scope>
</dependency>

Expand All @@ -180,13 +165,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
</project>
Loading

0 comments on commit b1ce6ad

Please sign in to comment.