-
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
0 parents
commit 3fbc692
Showing
13 changed files
with
1,423 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build | ||
on: [workflow_dispatch, push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: temurin | ||
cache: gradle | ||
|
||
- name: Validate Gradle Wrapper Integrity | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Make Gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build | ||
run: ./gradlew build | ||
|
||
- name: Capture build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/libs | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: build/libs/*.jar |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# eclipse | ||
bin | ||
*.launch | ||
.settings | ||
.metadata | ||
.classpath | ||
.project | ||
|
||
# idea | ||
out | ||
*.ipr | ||
*.iws | ||
*.iml | ||
.idea | ||
|
||
# gradle | ||
build | ||
.gradle | ||
|
||
# other | ||
eclipse | ||
run | ||
|
||
# Custom | ||
.DS_Store |
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.5-SNAPSHOT' | ||
id 'maven-publish' | ||
} | ||
|
||
version = mod_version | ||
group = maven_group | ||
|
||
base { | ||
archivesName = archives_base_name | ||
} | ||
|
||
repositories { | ||
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings | ||
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings | ||
} | ||
|
||
dependencies { | ||
// To change the versions see the gradle.properties file | ||
minecraft "com.mojang:minecraft:${minecraft_version}" | ||
|
||
mappings(loom.layered { | ||
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2") | ||
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip") | ||
it.officialMojangMappings { nameSyntheticMembers = false } | ||
}) | ||
|
||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}" | ||
} | ||
|
||
processResources { | ||
// set up properties for filling into metadata | ||
Map<String, String> properties = Map.of( | ||
"version", version as String, | ||
"fabric_loader_version", fabric_loader_version, | ||
"fabric_api_version", fabric_api_version, | ||
"minecraft_version", minecraft_version, | ||
) | ||
properties.forEach((k, v) -> inputs.property(k, v)) | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand properties | ||
} | ||
} | ||
|
||
def targetJavaVersion = 17 | ||
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" | ||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { | ||
it.options.release.set(targetJavaVersion) | ||
} | ||
} | ||
|
||
java { | ||
def javaVersion = JavaVersion.toVersion(targetJavaVersion) | ||
if (JavaVersion.current() < javaVersion) { | ||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) | ||
} | ||
// 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() | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Done to increase the memory available to Gradle. | ||
org.gradle.jvmargs=-Xmx2G | ||
|
||
# Mod Properties | ||
mod_version = 0.0.1 | ||
maven_group = dev.ithundxr | ||
archives_base_name = RailwaysTweaks | ||
|
||
minecraft_version=1.20.1 | ||
|
||
# Mappings | ||
# https://lambdaurora.dev/tools/import_quilt.html | ||
qm_version = 23 | ||
# https://parchmentmc.org/docs/getting-started | ||
parchment_version = 2023.09.03 | ||
|
||
# Fabric Properties | ||
# check these on https://modmuss50.me/fabric.html | ||
fabric_loader_version=0.15.7 | ||
fabric_api_version=0.92.0+1.20.1 |
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 |
---|---|---|
@@ -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 |
Oops, something went wrong.