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
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
build:
strategy:
matrix:
java: [ 21 ]
java: [ 25 ]
gradle: [ wrapper, current]
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- java: 21
- java: 25
gradle: wrapper
os: ubuntu-latest
upload: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 21
java-version: 25

- name: Gradle Build
uses: gradle/gradle-build-action@v2
Expand Down
76 changes: 29 additions & 47 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,55 +1,28 @@
plugins {
id 'net.fabricmc.fabric-loom-remap' version "1.14-SNAPSHOT"
// id "org.ajoberstar.grgit" version "3.1.1"
id "net.fabricmc.fabric-loom" version "${loom_version}"
}

repositories {
maven { url = "https://maven.fabricmc.net/" }
maven { url = "https://minecraft.guntram.de/maven/" }
maven { url = "file:///tmp/mymavenrepo/" }
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url = "https://jitpack.io" }
maven { url = "https://maven.shedaniel.me/" }
maven { url = "https://maven.terraformersmc.com/" }
maven { url = 'https://masa.dy.fi/maven' }
}

ext.Version = new Properties()
Version.load(file("version.properties").newReader())
ext.projectVersion = mod_version

ext.projectVersion = Version['modVersion']

ext.Versions = new Properties()
Versions.load(file("Versionfiles/${Version['minecraftVersion']}.properties").newReader())


version = "${project.projectVersion}-${Version['minecraftVersion']}"

def getBranch() {
if (System.getenv().GIT_BRANCH) {
def branch = System.getenv().GIT_BRANCH
return branch.substring(branch.lastIndexOf("/") + 1)
}

if (grgit == null) {
return "unknown"
}

def branch = grgit.branch.current().name
return branch.substring(branch.lastIndexOf("/") + 1)
}
version = "${mod_version}-${minecraft_version}"

loom {
mixin.defaultRefmapName = "blockmeter-refmap.json";
}

processResources {
duplicatesStrategy "warn"
inputs.property "version", project.projectVersion
inputs.property "version", mod_version

from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.projectVersion
expand "version": mod_version
}

from(sourceSets.main.resources.srcDirs) {
Expand All @@ -58,38 +31,47 @@ processResources {
}

dependencies {
modImplementation("org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT") {
compileOnly("org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT") {
// This is to fix the error:
// com.google.*:*:* has more than one client module definitions
// in gradle > 4
exclude group: "com.google.guava", module: "guava"
exclude group: "com.google.code.gson", module: "gson"
}

minecraft "com.mojang:minecraft:${Versions['minecraft_version']}"
mappings "net.fabricmc:yarn:${Versions['yarn_mappings']}:v2"
modImplementation "net.fabricmc:fabric-loader:${Versions['loader_version']}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${Versions['fabric_api']}"
minecraft "com.mojang:minecraft:${minecraft_version}"
implementation "net.fabricmc:fabric-loader:${loader_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"

modImplementation "com.terraformersmc:modmenu:${Versions['modmenu']}"
modApi("me.shedaniel.cloth:cloth-config-fabric:${Versions['cloth_config']}") {
implementation "com.terraformersmc:modmenu:${modmenu_version}"
implementation("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
include "me.shedaniel.cloth:cloth-config-fabric:${Versions['cloth_config']}"
// modImplementation "fi.dy.masa.malilib:malilib-fabric-${Versions['minecraft_version']}:${Versions['malilib']}"
include "me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}"

// Testing
testImplementation "org.junit.jupiter:junit-jupiter:5.+"
testImplementation "org.assertj:assertj-core:3.+"
testImplementation "org.mockito:mockito-inline:3.+"
}

// 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) {
archiveClassifier = "sources"
from sourceSets.main.allSource
processResources {
duplicatesStrategy "warn"
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": inputs.properties.version
}
}

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

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

jar {
Expand Down
14 changes: 13 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
org.gradle.jvmargs=-Xms128m -Xmx1024m
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
org.gradle.configuration-cache=false

mod_version = 1.19
loom_version=1.16-SNAPSHOT

minecraft_version=26.1
loader_version=0.19.2
fabric_api_version=0.146.1+26.1.2
modmenu_version=18.0.0-alpha.8
cloth_config_version=26.1.154

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading