9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00

merge modules

This commit is contained in:
XiaoMoMi
2025-01-27 00:06:03 +08:00
parent 33c637ed83
commit 231a953f9f
87 changed files with 43 additions and 95 deletions

View File

@@ -1,7 +1,6 @@
# Custom-Fishing
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/Xiao-MoMi/Custom-Fishing)
[![](https://jitpack.io/v/Xiao-MoMi/Custom-Fishing.svg)](https://jitpack.io/#Xiao-MoMi/Custom-Fishing)
<a href="https://mo-mi.gitbook.io/xiaomomi-plugins/plugin-wiki/customfishing" alt="GitBook">
<img src="https://img.shields.io/badge/docs-gitbook-brightgreen" alt="Gitbook"/>
</a>
@@ -26,7 +25,7 @@ Get the artifact under /target folder
## How to Contribute
#### Translations
Clone this project and create a new language file in the /common/src/main/resources/translations directory. \
Clone this project and create a new language file in the /core/src/main/resources/translations directory. \
Once your changes are ready, open a pull request for review. We appreciate your works!
## Support the Developer
@@ -37,48 +36,14 @@ Afdian: https://afdian.com/@xiaomomi/
## CustomFishing API
### Maven
```html
<repositories>
<repository>
<id>jitpack</id>
<url>https://jitpack.io/</url>
</repository>
</repositories>
```
```html
<dependencies>
<dependency>
<groupId>com.github.Xiao-MoMi</groupId>
<artifactId>Custom-Fishing</artifactId>
<version>{VERSION}</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
### Gradle (Groovy)
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```
```groovy
dependencies {
compileOnly 'com.github.Xiao-MoMi:Custom-Fishing:{VERSION}'
}
```
### Gradle (Kotlin)
```kotlin
repositories {
maven("https://jitpack.io/")
maven("https://repo.momirealms.net/releases/")
}
```
```kotlin
dependencies {
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:{VERSION}")
compileOnly("net.momirealms:custom-fishing:2.3.3")
}
```
#### Fun Facts

View File

@@ -1,5 +1,4 @@
plugins {
id("io.github.goooler.shadow") version "8.1.8"
id("maven-publish")
}
@@ -11,7 +10,6 @@ repositories {
}
dependencies {
implementation(project(":common"))
implementation(files("libs/boosted-yaml-${rootProject.properties["boosted_yaml_version"]}.jar"))
implementation("com.saicone.rtag:rtag:${rootProject.properties["rtag_version"]}")
implementation("com.saicone.rtag:rtag-item:${rootProject.properties["rtag_version"]}")
@@ -19,6 +17,16 @@ dependencies {
compileOnly("com.google.code.gson:gson:${rootProject.properties["gson_version"]}")
compileOnly("me.clip:placeholderapi:${rootProject.properties["placeholder_api_version"]}")
compileOnly("com.github.Xiao-MoMi:Sparrow-Heart:${rootProject.properties["sparrow_heart_version"]}")
compileOnly("org.incendo:cloud-core:${rootProject.properties["cloud_core_version"]}")
compileOnly("org.incendo:cloud-minecraft-extras:${rootProject.properties["cloud_minecraft_extras_version"]}")
compileOnly("org.jetbrains:annotations:${rootProject.properties["jetbrains_annotations_version"]}")
compileOnly("org.slf4j:slf4j-api:${rootProject.properties["slf4j_version"]}")
compileOnly("org.apache.logging.log4j:log4j-core:${rootProject.properties["log4j_version"]}")
compileOnly("net.kyori:adventure-text-minimessage:${rootProject.properties["adventure_bundle_version"]}")
compileOnly("net.kyori:adventure-text-serializer-gson:${rootProject.properties["adventure_bundle_version"]}")
compileOnly("com.github.ben-manes.caffeine:caffeine:${rootProject.properties["caffeine_version"]}")
compileOnly("net.objecthunter:exp4j:${rootProject.properties["exp4j_version"]}")
compileOnly("com.google.guava:guava:${rootProject.properties["guava_version"]}")
}
java {
@@ -27,6 +35,7 @@ java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withSourcesJar()
}
tasks.withType<JavaCompile> {
@@ -38,7 +47,7 @@ tasks.withType<JavaCompile> {
tasks {
shadowJar {
archiveClassifier = ""
archiveFileName = "CustomFishing-${rootProject.properties["project_version"]}.jar"
archiveFileName = "custom-fishing-${rootProject.properties["project_version"]}.jar"
relocate("net.kyori", "net.momirealms.customfishing.libraries")
relocate("dev.dejvokep", "net.momirealms.customfishing.libraries")
relocate("com.saicone.rtag", "net.momirealms.customfishing.libraries.rtag")
@@ -46,12 +55,34 @@ tasks {
}
publishing {
repositories {
maven {
url = uri("https://repo.momirealms.net/releases")
credentials(PasswordCredentials::class) {
username = System.getenv("REPO_USERNAME")
password = System.getenv("REPO_PASSWORD")
}
}
}
publications {
create<MavenPublication>("mavenJava") {
groupId = "net.momirealms"
artifactId = "CustomFishing"
version = rootProject.version.toString()
artifact(tasks.shadowJar)
artifactId = "custom-fishing"
version = rootProject.properties["project_version"].toString()
artifact(tasks["sourcesJar"])
from(components["shadow"])
pom {
name = "CustomFishing API"
url = "https://github.com/Xiao-MoMi/Custom-Fishing"
licenses {
license {
name = "GNU General Public License v3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.html"
distribution = "repo"
}
}
}
}
}
}

View File

@@ -3,6 +3,7 @@ import java.io.ByteArrayOutputStream
plugins {
id("java")
id("com.gradleup.shadow") version "9.0.0-beta6"
}
val git : String = versionBanner()
@@ -11,9 +12,8 @@ ext["git_version"] = git
ext["builder"] = builder
subprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "com.gradleup.shadow")
repositories {
mavenCentral()

View File

@@ -1,38 +0,0 @@
repositories {
maven("https://jitpack.io/") // rtag
}
dependencies {
compileOnly("net.kyori:adventure-api:${rootProject.properties["adventure_bundle_version"]}") {
exclude(module = "adventure-bom")
exclude(module = "checker-qual")
exclude(module = "annotations")
}
compileOnly("org.incendo:cloud-core:${rootProject.properties["cloud_core_version"]}")
compileOnly("org.incendo:cloud-minecraft-extras:${rootProject.properties["cloud_minecraft_extras_version"]}")
compileOnly("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
compileOnly("org.jetbrains:annotations:${rootProject.properties["jetbrains_annotations_version"]}")
compileOnly("org.slf4j:slf4j-api:${rootProject.properties["slf4j_version"]}")
compileOnly("org.apache.logging.log4j:log4j-core:${rootProject.properties["log4j_version"]}")
compileOnly("net.kyori:adventure-text-minimessage:${rootProject.properties["adventure_bundle_version"]}")
compileOnly("net.kyori:adventure-text-serializer-gson:${rootProject.properties["adventure_bundle_version"]}")
compileOnly("com.google.code.gson:gson:${rootProject.properties["gson_version"]}")
compileOnly("com.github.ben-manes.caffeine:caffeine:${rootProject.properties["caffeine_version"]}")
compileOnly("com.saicone.rtag:rtag:${rootProject.properties["rtag_version"]}")
compileOnly("net.objecthunter:exp4j:${rootProject.properties["exp4j_version"]}")
compileOnly("com.google.guava:guava:${rootProject.properties["guava_version"]}")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
dependsOn(tasks.clean)
}

View File

@@ -15,7 +15,6 @@ repositories {
}
dependencies {
compileOnly(project(":common"))
compileOnly(project(":api"))
compileOnly("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
compileOnly("net.kyori:adventure-api:${rootProject.properties["adventure_bundle_version"]}") {

View File

@@ -6,7 +6,6 @@ repositories {
dependencies {
compileOnly(project(":api"))
compileOnly(project(":common"))
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.nexomc:nexo:0.5.0-dev.8")
}

View File

@@ -1,7 +1,3 @@
plugins {
id("io.github.goooler.shadow") version "8.1.8"
}
repositories {
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // papi
maven("https://libraries.minecraft.net") // brigadier
@@ -15,7 +11,6 @@ dependencies {
// platform
compileOnly("dev.folia:folia-api:${rootProject.properties["paper_version"]}-R0.1-SNAPSHOT")
// subprojects
implementation(project(":common"))
implementation(project(":api")) {
exclude("dev.dejvokep", "boosted-yaml")
}

View File

@@ -60,7 +60,6 @@ import net.momirealms.sparrow.heart.SparrowHeart;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.InputStream;
import java.nio.file.Path;

View File

@@ -21,7 +21,6 @@ import dev.dejvokep.boostedyaml.YamlDocument;
import dev.dejvokep.boostedyaml.block.implementation.Section;
import net.momirealms.customfishing.api.BukkitCustomFishingPlugin;
import net.momirealms.customfishing.api.mechanic.context.Context;
import net.momirealms.customfishing.api.mechanic.context.ContextKeys;
import net.momirealms.customfishing.api.mechanic.effect.Effect;
import net.momirealms.customfishing.api.mechanic.loot.Loot;
import net.momirealms.customfishing.api.mechanic.loot.LootManager;

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -1,6 +1,5 @@
rootProject.name = "CustomFishing"
include(":api")
include(":common")
include(":core")
include(":compatibility")
include(":compatibility:j21")