Skip to content

Commit

Permalink
Update gradle template
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Aug 19, 2024
1 parent 5f18568 commit fb9dc28
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 24 deletions.
154 changes: 149 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,151 @@
.DS_Store
target/
build/
.idea
*.iml
# Created by https://www.toptal.com/developers/gitignore/api/intellij,gradle,java
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij,gradle,java

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# 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*
replay_pid*

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Gradle Patch ###
# Java heap dump
*.hprof

# End of https://www.toptal.com/developers/gitignore/api/intellij,gradle,java
.envrc
.direnv
shell.nix
run
Binary file modified .gradle/file-system.probe
Binary file not shown.
37 changes: 23 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration

plugins {
java
`maven-publish`
id("com.gradleup.shadow") version "8.3.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("io.papermc.paperweight.userdev") version "1.7.2"
}

repositories {
mavenLocal()
maven {
url = uri("https://papermc.io/repo/repository/maven-public/")
}

maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://eldonexus.de/repository/maven-releases/")
}

group = "club.devcord.gamejam"
version = "1.0.0"
description = "gamejam"

dependencies {
testImplementation("junit:junit:4.13.2")
compileOnly("io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
compileOnly("de.chojo.pluginjam:plugin-paper:1.0.3")
}

group = "club.devcord.gamejam"
version = "1.0.0"
description = "gamejam"
paperweight {
reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION
}

java {
toolchain {
Expand All @@ -38,8 +41,14 @@ publishing {
}
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
tasks {
compileJava {
options.encoding = "UTF-8"
}

runServer {
minecraftVersion("1.21.1")
}
}

bukkit {
Expand Down
11 changes: 7 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/*
* This file was generated by the Gradle 'init' task.
*/

rootProject.name = "gamejam"

pluginManagement {
repositories {
gradlePluginPortal()
maven("https://papermc.io/repo/repository/Maven-public/")
}
}
5 changes: 4 additions & 1 deletion src/main/java/club/devcord/gamejam/JamPlugin.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package club.devcord.gamejam;


import de.chojo.pluginjam.PluginJam;
import de.chojo.pluginjam.serverapi.ServerApi;
import org.bukkit.plugin.java.JavaPlugin;

public class JamPlugin extends JavaPlugin {
Expand All @@ -12,6 +14,7 @@ public void onDisable() {

@Override
public void onEnable() {

ServerApi api = getPlugin(PluginJam.class).api();
// api.requestRestart();
}
}

0 comments on commit fb9dc28

Please sign in to comment.