Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# gradle

.gradle/
gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

# fabric
# macos
*.DS_Store

# fabric
run/
logs/

# java
hs_err_*.log
replay_*.log
*.hprof
*.jfr
85 changes: 36 additions & 49 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,73 +1,60 @@
plugins {
id 'fabric-loom' version '0.7.1'
id 'maven-publish'
alias libs.plugins.fabric.loom
id "maven-publish"
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
version = "$mod_version+$target_version"
group = maven_group

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
base {
archivesName = archives_name
}

dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
repositories {
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://jitpack.io" }
}

// Fabric API. This is technically optional, but you probably want it anyway.
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
loom {
decompilers {
vineflower {
options.putAll(["mark-corresponding-synthetics": "1", "ind": " "])
}
}
mixin {
useLegacyMixinAp = false
}
}

// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
dependencies {
minecraft libs.minecraft
mappings variantOf(libs.yarn.mappings) { classifier "v2" }
modImplementation libs.fabric.loader
vineflowerDecompilerClasspath libs.vineflower
}

processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version
filesMatching "fabric.mod.json", {
expand "version": version
}
}

// 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
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) it.options.release.set(8)
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}

jar {
from "LICENSE"
}

// 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
}
}
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
publications.create("mavenJava", MavenPublication) {
from components.java
}
repositories {}
}
19 changes: 8 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.1
yarn_mappings=1.16.1+build.21
loader_version=0.11.3
# Mod Properties
mod_version=1.5
maven_group=fast-reset-1.16.1-v
archives_base_name=fast-reset-1.16.1-v
org.gradle.jvmargs = -Xmx2G
org.gradle.parallel = true
org.gradle.caching = true

mod_version = 1.4.2
target_version = 1.16.1
archives_name = fast-reset
maven_group = fast_reset.client
15 changes: 15 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[versions]
minecraft = "1.16.1"
yarn_mappings = "1.16.1.build.19"
fabric_loader = "0.15.6"
loom = "1.5-SNAPSHOT"
vineflower = "1.10.0-SNAPSHOT"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
yarn_mappings = { module = "com.github.redlime:yarn", version.ref = "yarn_mappings" }
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric_loader" }
vineflower = { module = "org.vineflower:vineflower", version.ref = "vineflower" }

[plugins]
fabric_loom = { id = "fabric-loom", version.ref = "loom" }
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.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading