mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-12 10:24:29 +01:00
Merge branch 'main' into ver/1.3
Signed-off-by: Ryder Belserion <no-reply@ryderbelserion.com>
This commit is contained in:
commit
5233dd88db
167
build.gradle
167
build.gradle
@ -1,151 +1,64 @@
|
||||
import io.papermc.hangarpublishplugin.model.Platforms
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.hangar)
|
||||
alias(libs.plugins.modrinth)
|
||||
alias(libs.plugins.paperweight)
|
||||
alias(libs.plugins.shadowjar)
|
||||
|
||||
id 'java-library'
|
||||
alias(libs.plugins.runpaper)
|
||||
}
|
||||
|
||||
defaultTasks 'build'
|
||||
project.group = "${rootProject.group}.paper"
|
||||
project.version = rootProject.version
|
||||
|
||||
def combineJars = tasks.register("combineJars", org.gradle.jvm.tasks.Jar) {
|
||||
mustRunAfter build
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
from(files(subprojects.findAll { it.name != 'webmap' }.collect {
|
||||
it.layout.buildDirectory.file("libs/${rootProject.name}-${it.name}-${it.version}.jar").get()
|
||||
}).filter { it.name != 'MANIFEST.MF' }.collect { if (it.isDirectory()) it else zipTree(it) })
|
||||
|
||||
doLast {
|
||||
File dir = new File(rootDir, "jars")
|
||||
|
||||
if (dir.exists()) dir.delete()
|
||||
|
||||
dir.mkdirs()
|
||||
|
||||
copy {
|
||||
from(layout.buildDirectory.file("libs/${rootProject.name}-${rootProject.version}.jar"))
|
||||
into(dir)
|
||||
}
|
||||
}
|
||||
base {
|
||||
archivesName = "${rootProject.name}-${project.name}"
|
||||
}
|
||||
|
||||
assemble {
|
||||
subprojects.forEach { project -> dependsOn ":${project.name}:build" }
|
||||
dependencies {
|
||||
implementation(libs.metrics)
|
||||
|
||||
finalizedBy combineJars
|
||||
compileOnly(libs.vault)
|
||||
|
||||
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:$minecraftVersion-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java-library'
|
||||
tasks {
|
||||
runServer {
|
||||
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
|
||||
|
||||
repositories {
|
||||
maven { url = 'https://repo.crazycrew.us/releases' }
|
||||
|
||||
maven { url = 'https://jitpack.io' }
|
||||
|
||||
mavenCentral()
|
||||
minecraftVersion(minecraftVersion)
|
||||
}
|
||||
|
||||
if (name == "paper") {
|
||||
repositories {
|
||||
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
|
||||
assemble {
|
||||
dependsOn(reobfJar)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
mergeServiceFiles()
|
||||
|
||||
exclude("META-INF/**")
|
||||
|
||||
List.of(
|
||||
"org.bstats"
|
||||
).forEach {
|
||||
relocate(it, "libs.$it")
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = 'UTF-8'
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
processResources {
|
||||
filteringCharset = 'UTF-8'
|
||||
}
|
||||
}
|
||||
Map<String, String> props = new HashMap<>()
|
||||
|
||||
boolean isBeta = true
|
||||
String modrinthType = isBeta ? "beta" : "release"
|
||||
String hangarType = isBeta ? "Beta" : "Release"
|
||||
props.put("name", rootProject.name)
|
||||
props.put("version", "$rootProject.version")
|
||||
props.put("group", "$project.group")
|
||||
props.put("description", rootProject.description)
|
||||
|
||||
String description = """
|
||||
# Please take backups and report any bugs you find!
|
||||
props.put("apiVersion", apiVersion)
|
||||
props.put("authors", authors)
|
||||
props.put("website", website)
|
||||
|
||||
## Breaking Changes:
|
||||
* Permissions have changed, You can view the updated permissions @ https://github.com/Crazy-Crew/CrazyAuctions/blob/main/paper/src/main/resources/plugin.yml
|
||||
inputs.properties(props)
|
||||
|
||||
## Changes:
|
||||
* Re-organized and cleaned up a large portion of the code, Functionality shouldn't change
|
||||
* Added proper tab completion
|
||||
* Added proper permissions to plugin.yml
|
||||
|
||||
## Optimizations:
|
||||
* Only use uuid for hashmap's / arrays as god intended.
|
||||
|
||||
## Warning:
|
||||
* Data is still stored only using name's which is terrible but at the moment it's annoying to remove, It will change in the next few versions after some more clean up is made.
|
||||
|
||||
## Developers:
|
||||
* Do not rely on any methods in CrazyAuctions as an API, it will constantly be refactored and moved around until told otherwise.
|
||||
|
||||
## Other:
|
||||
* [Feature Requests](https://github.com/Crazy-Crew/${rootProject.name}/issues)
|
||||
* [Bug Reports](https://github.com/Crazy-Crew/${rootProject.name}/issues)
|
||||
"""
|
||||
|
||||
File file = layout.buildDirectory.file("libs/${rootProject.name}-${rootProject.version}.jar").get().asFile
|
||||
|
||||
modrinth {
|
||||
setAutoAddDependsOn(false)
|
||||
|
||||
token.set(System.getenv("modrinth_token"))
|
||||
|
||||
projectId.set(rootProject.name.toLowerCase())
|
||||
|
||||
versionName.set("${rootProject.name} ${rootProject.version}")
|
||||
|
||||
versionNumber.set("${rootProject.version}")
|
||||
|
||||
versionType.set(modrinthType)
|
||||
|
||||
uploadFile.set(file)
|
||||
|
||||
gameVersions.add(minecraftVersion)
|
||||
|
||||
changelog.set(description)
|
||||
|
||||
loaders.addAll("paper", "purpur")
|
||||
}
|
||||
|
||||
hangarPublish {
|
||||
publications.register("plugin") {
|
||||
version.set("$rootProject.version")
|
||||
|
||||
id.set(rootProject.name)
|
||||
|
||||
channel.set(hangarType)
|
||||
|
||||
changelog.set(description)
|
||||
|
||||
apiKey.set(System.getenv("hangar_key"))
|
||||
|
||||
platforms {
|
||||
register(Platforms.PAPER) {
|
||||
jar.set(file)
|
||||
|
||||
platformVersions.set(["$minecraftVersion"])
|
||||
}
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
}
|
||||
}
|
0
common/build.gradle
Normal file
0
common/build.gradle
Normal file
@ -0,0 +1,7 @@
|
||||
package com.badbones69.crazyauctions.common.config;
|
||||
|
||||
public class ConfigFactory {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.badbones69.crazyauctions.common.storage;
|
||||
|
||||
public class StorageFactory {
|
||||
|
||||
|
||||
|
||||
}
|
8
paper/src/main/resources/paper-plugin.yml
Normal file
8
paper/src/main/resources/paper-plugin.yml
Normal file
@ -0,0 +1,8 @@
|
||||
name: '${name}'
|
||||
main: '${group}.CrazyAuctions'
|
||||
|
||||
version: '${version}'
|
||||
api-version: '${apiVersion}'
|
||||
description: '${description}'
|
||||
|
||||
bootstrapper: '${group}.CrazyStarter'
|
Loading…
Reference in New Issue
Block a user