Skip to content

Commit

Permalink
JitPack support using paperweight
Browse files Browse the repository at this point in the history
  • Loading branch information
GliczDev committed Dec 22, 2023
1 parent b5ba5d8 commit 746ac77
Show file tree
Hide file tree
Showing 48 changed files with 742 additions and 280 deletions.
118 changes: 118 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Cache of project
.gradletasknamecache

**/build/

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
80 changes: 80 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

plugins {
id("java")
id("maven-publish")
id("io.papermc.paperweight.userdev") version "1.5.11"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
}

group = "eu.endercentral.crazy_advancements"
version = "2.1.17"

repositories {
mavenCentral()
}

dependencies {
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
dependsOn(clean)
}

jar.get().archiveFileName = "${name}-${version}-mojmap.jar"
}

publishing {
publications {
create<MavenPublication>("maven") {
artifact(tasks.reobfJar)
artifact(tasks.jar).classifier = "mojmap"
}
}
}

bukkit {
main = "eu.endercentral.crazy_advancements.CrazyAdvancementsAPI"
author = "ZockerAxel"
apiVersion = "1.20" // Should be always same as dev bundle version (without minor versions)
load = BukkitPluginDescription.PluginLoadOrder.STARTUP

commands {
register("grant") {
usage = "/grant <Player> <Manager> <Advancement> [Criteria...]"
description = "Grants <Advancement>-[Criteria...] to <Player> in <Manager>"
aliases = listOf("cagrant")
}

register("revoke") {
usage = "/revoke <Player> <Manager> <Advancement> [Criteria...]"
description = "Revokes <Advancement>-[Criteria...] to <Player> in <Manager>"
aliases = listOf("carevoke")
}

register("setprogress") {
usage = "/setprogress <Player> <Manager> <Advancement> <Number> [Operation]"
description = "Sets <Advancement> Progress for <Player> in <Manager> using [Operation]"
aliases = listOf("caprogress")
}

register("showtoast") {
usage = "/showtoast <Player> <Icon> [Frame] <Message>"
description = "Displays a Toast Advancement Message"
aliases = listOf("catoast", "toast")
}

register("careload") {
usage = "/careload [Category]"
description = "Reloads the Crazy Advancements API. Valid categories are all, advancements, items"
}
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 746ac77

Please sign in to comment.