forked from Patbox/TextPlaceholderAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
151 additions
and
288 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,160 +1,85 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.6.+' | ||
id 'eclipse' | ||
id 'idea' | ||
id 'java-library' | ||
id 'net.neoforged.moddev' version '1.0.0' | ||
id 'maven-publish' | ||
id "com.modrinth.minotaur" version "2.+" | ||
id 'com.matthewprenger.cursegradle' version '1.4.0' | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
|
||
archivesBaseName = project.archives_base_name | ||
base { | ||
archivesName = project.mod_id | ||
} | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(21) | ||
|
||
repositories { | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
|
||
maven { url "https://maven.nucleoid.xyz" } | ||
maven { url "https://jitpack.io" } | ||
} | ||
neoForge { | ||
version = project.neo_version | ||
|
||
loom { | ||
runs { | ||
parchment { | ||
minecraftVersion = minecraft_version | ||
mappingsVersion = parchment_version | ||
} | ||
} | ||
|
||
dependencies { | ||
// To change the versions see the gradle.properties file | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings loom.officialMojangMappings() | ||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" | ||
runs { | ||
client { | ||
client() | ||
programArguments.addAll '--username', 'Dev###' | ||
} | ||
|
||
// Fabric API. This is technically optional, but you probably want it anyway. | ||
//modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" | ||
modCompileOnly("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") | ||
modLocalRuntime("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") | ||
} | ||
server { | ||
server() | ||
programArgument '--nogui' | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
configureEach { | ||
logLevel = org.slf4j.event.Level.WARN | ||
} | ||
} | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
mods { | ||
"${project.mod_id}" { | ||
sourceSet sourceSets.main | ||
} | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
// ensure that the encoding is set to UTF-8, no matter what the system default is | ||
// this fixes some edge cases with special characters not displaying correctly | ||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html | ||
// If Javadoc is generated, this must be specified in that task too. | ||
it.options.encoding = "UTF-8" | ||
tasks.withType(ProcessResources).configureEach { | ||
var replaceProperties = [ | ||
mod_id: mod_id, | ||
mod_version: mod_version, | ||
] | ||
inputs.properties replaceProperties | ||
|
||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too | ||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. | ||
// We'll use that if it's available, but otherwise we'll use the older option. | ||
it.options.release = 21 | ||
filesMatching(['META-INF/neoforge.mods.toml']) { | ||
expand replaceProperties | ||
} | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
idea { | ||
module { | ||
downloadSources = true | ||
downloadJavadoc = true | ||
} | ||
} | ||
|
||
def env = System.getenv() | ||
|
||
// configure the maven publication | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
// add all the jars that should be included when publishing to maven | ||
artifact(remapJar) { | ||
builtBy remapJar | ||
} | ||
artifact(sourcesJar) { | ||
builtBy remapSourcesJar | ||
} | ||
register('mavenJava', MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
repositories { | ||
if (env.MAVEN_URL) { | ||
maven { | ||
credentials { | ||
username env.MAVEN_USERNAME | ||
password env.MAVEN_PASSWORD | ||
} | ||
url env.MAVEN_URL | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (System.getenv("MODRINTH")) { | ||
modrinth { | ||
token = System.getenv("MODRINTH") | ||
projectId = 'eXts2L7r'// The ID of your modrinth project, slugs will not work. | ||
versionNumber = "" + version // The version of the mod to upload. | ||
versionType = "release" | ||
uploadFile = remapJar // This links to a task that builds your mod jar and sets "uploadFile" to the mod jar. | ||
gameVersions = [((String) project.minecraft_version)] | ||
changelog = System.getenv("CHANGELOG") | ||
loaders = ["fabric", "quilt"] | ||
} | ||
|
||
remapJar { | ||
finalizedBy project.tasks.modrinth | ||
} | ||
} | ||
|
||
|
||
curseforge { | ||
if (System.getenv("CURSEFORGE")) { | ||
apiKey = System.getenv("CURSEFORGE") | ||
|
||
project { | ||
id = "1037459" | ||
releaseType = "release" | ||
changelog = System.getenv("CHANGELOG") | ||
changelogType = "markdown" | ||
addGameVersion((project.minecraft_version.contains("-") ? ((String) project.minecraft_version.split("-")[0] + "-Snapshot") : project.minecraft_version)) | ||
addGameVersion "Fabric" | ||
addGameVersion "Quilt" | ||
mainArtifact(remapJar) | ||
|
||
afterEvaluate { | ||
uploadTask.dependsOn("remapJar") | ||
} | ||
if (project.hasProperty('mavendir')) { | ||
maven { url mavendir } | ||
} else { | ||
mavenLocal() | ||
} | ||
} | ||
|
||
options { | ||
forgeGradleIntegration = false | ||
} | ||
remapJar { | ||
finalizedBy project.tasks.curseforge | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
|
||
# Fabric Properties | ||
# check these on https://fabricmc.net/use | ||
minecraft_version=1.21 | ||
yarn_mappings=1.21+build.2 | ||
loader_version=0.15.11 | ||
|
||
#Fabric api | ||
fabric_version=0.100.1+1.21 | ||
|
||
# Mod Properties | ||
mod_version = 2.4.1+1.21 | ||
maven_group = eu.pb4 | ||
archives_base_name = placeholder-api | ||
mod_id=placeholder-api | ||
maven_group=eu.pb4 | ||
mod_version=2.4.1+1.21 | ||
minecraft_version=1.21 | ||
neo_version=21.0.58-beta | ||
parchment_version=2024.06.23 | ||
|
||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.