Skip to content
Open
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
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

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

30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

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

# vscode

Expand All @@ -20,6 +24,17 @@ bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/
run/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 TomB_134

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
89 changes: 59 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,78 @@
plugins {
id 'fabric-loom' version '0.2.5-SNAPSHOT'
id "com.matthewprenger.cursegradle" version "1.4.0"
id "maven-publish"
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

group = "com.github.NerdHubMC"
archivesBaseName = "infinityfix"
version = project.release_version

minecraft {
version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
maven { url = "https://oss.sonatype.org/content/repositories/releases/" }
// 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.
}

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
// 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}"

}

//apply from: "https://raw.githubusercontent.com/NerdHubMC/Gradle-Scripts/master/scripts/fabric/basic_project.gradle"
processResources {
inputs.property "version", project.version

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

processResources {
// this will ensure that this task is redone when there"s a change
inputs.property "version", project.version
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}

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

// replace stuff in fabric.mod.json, nothing else
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

// add mod metadata
expand "version": project.version
}
jar {
inputs.property "archivesName", project.base.archivesName

// copy everything else, that"s not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
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.
}
}
29 changes: 20 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
curseforge_id =315804
changelog_url = https://github.com/NerdHubMC/infinityfix/changelog.md
release_type = release
release_version = 1.1.0
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.14
loom_version=1.10-SNAPSHOT

minecraft_version=1.14.4
yarn_mappings=1.14.4+build.9
loader_version=0.4.8+build.159
# Mod Properties
mod_version=1.2.0
maven_group=com.github.NerdHubMC
archives_base_name=infinityfix

#Fabric api
fabric_version=0.3.1+build.208
# Dependencies
fabric_version=0.116.0+1.21.1

# Release Properties
curseforge_id =315804
changelog_url = https://github.com/NerdHubMC/infinityfix/changelog.md
release_type = release
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 3 additions & 4 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Mon Aug 22 17:36:22 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
654
ds
Loading