-
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 04a9aba
Showing
18 changed files
with
717 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,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 | ||
|
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 @@ | ||
# 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: | ||
strategy: | ||
matrix: | ||
# Use these Java versions | ||
java: [ | ||
21, # Current Java LTS | ||
] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
- name: build | ||
run: ./gradlew build | ||
- name: capture build artifacts | ||
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ |
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,41 @@ | ||
# gradle | ||
|
||
.gradle/ | ||
build/ | ||
out/ | ||
classes/ | ||
|
||
# eclipse | ||
|
||
*.launch | ||
|
||
# idea | ||
|
||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# vscode | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# macos | ||
|
||
*.DS_Store | ||
|
||
# fabric | ||
|
||
run/ | ||
|
||
# java | ||
|
||
hs_err_*.log | ||
replay_*.log | ||
*.hprof | ||
*.jfr | ||
.kotlin/ |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 Daniel Orr | ||
|
||
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. |
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,131 @@ | ||
plugins { | ||
id "fabric-loom" version "1.8-SNAPSHOT" | ||
id "org.jetbrains.kotlin.jvm" | ||
id "maven-publish" | ||
} | ||
|
||
version = mod_version | ||
group = maven_group | ||
|
||
base { | ||
archivesName = mod_id | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "Andante" | ||
url = "https://maven.andante.dev/releases/" | ||
} | ||
} | ||
|
||
sourceSets { | ||
test { | ||
compileClasspath += main.compileClasspath | ||
runtimeClasspath += main.runtimeClasspath | ||
} | ||
} | ||
|
||
loom { | ||
accessWidenerPath = file("src/main/resources/${mod_id}.accesswidener") | ||
splitEnvironmentSourceSets() | ||
|
||
mods { | ||
mod_id { | ||
sourceSet sourceSets.main | ||
sourceSet sourceSets.client | ||
} | ||
} | ||
|
||
runs { | ||
client { | ||
ideConfigGenerated = false | ||
} | ||
|
||
testServer { | ||
inherit(server) | ||
name("Minecraft Server (Test)") | ||
source(sourceSets.test) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:$minecraft_version" | ||
mappings "net.fabricmc:yarn:$minecraft_version+build.$yarn_build:v2" | ||
|
||
modImplementation "net.fabricmc:fabric-loader:$loader_version" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:$fabric_version" | ||
|
||
modImplementation "net.fabricmc:fabric-language-kotlin:$fabric_kotlin_version+kotlin.$kotlin_version" | ||
|
||
testImplementation sourceSets.main.output | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
it.options.release = 21 | ||
} | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { | ||
kotlinOptions { | ||
jvmTarget = 21 | ||
} | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
|
||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${base.archivesName.get()}"} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = mod_id | ||
from components.java | ||
|
||
pom { | ||
name = "Railroad" | ||
description = "A library for creating server-side camera animation tracks." | ||
url = "https://mcbrawls.net" | ||
|
||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://opensource.org/licenses/MIT" | ||
distribution = "repo" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
// Andante's Maven | ||
def env = System.getenv() | ||
def mavenUsername = env["MAVEN_USERNAME_ANDANTE"] | ||
def mavenPassword = env["MAVEN_PASSWORD_ANDANTE"] | ||
if (mavenUsername && mavenPassword) { | ||
maven { | ||
name = "Andante" | ||
url = "https://maven.andante.dev/releases/" | ||
credentials.username = mavenUsername | ||
credentials.password = mavenPassword | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
# gradle | ||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.parallel=true | ||
|
||
# minecraft | ||
minecraft_version=1.21.3 | ||
yarn_build=2 | ||
|
||
# fabric | ||
loader_version=0.16.9 | ||
fabric_version=0.107.0+1.21.3 | ||
|
||
# kotlin | ||
kotlin_version=2.0.21 | ||
fabric_kotlin_version=1.12.3 | ||
|
||
# mod properties | ||
mod_version=1.3.0 | ||
maven_group=net.mcbrawls | ||
mod_id=railroad |
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.10.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.