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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@

# These are Windows script files and should use crlf
*.bat text eol=crlf

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ hs_err_*.log
replay_*.log
*.hprof
*.jfr
/remappedSrc/
File renamed without changes.
77 changes: 12 additions & 65 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,90 +1,37 @@
plugins {
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
id 'net.fabricmc.fabric-loom' version "${loom_version}"
}

version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}
base { archivesName = project.mod_id }

repositories {
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}

loom {
splitEnvironmentSourceSets()

mods {
"better-compass" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}

maven { url "https://maven.terraformersmc.com/releases/" }
}

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

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
implementation "com.terraformersmc:modmenu:${project.modmenu_version}"
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": inputs.properties.version
}
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") { expand "version": project.version }
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
tasks.withType(JavaCompile).configureEach { it.options.release = 25 }

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()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}


jar {
inputs.property "archivesName", project.base.archivesName

from("LICENSE") {
rename { "${it}_${inputs.properties.archivesName}"}
}
}

// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
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.
}
from("LICENSE.md") { rename { "${it}_${inputs.properties.archivesName}"} }
}
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Done to increase the memory available to Gradle.
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
org.gradle.configuration-cache=false

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.1
loader_version=0.18.1
loom_version=1.13-SNAPSHOT
# Fabric Properties on https://modmuss50.me/fabric.html
minecraft_version=26.3
loom_version=1.18-SNAPSHOT
loader_version=0.19.5
fabric_api_version=0.161.0+26.3

# Mod Properties
mod_version=1.0.8
maven_group=fr.madu59
archives_base_name=better-compass
mod_id=better-compass

# Dependencies
fabric_version=0.139.4+1.21.11
modmenu_version = 15.0.0
# Mod Menu from https://modrinth.com/mod/modmenu/versions
modmenu_version=21.0.0
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
Loading
Loading