Skip to content

Commit 7c1b7db

Browse files
committed
Push The Code
1 parent e042dec commit 7c1b7db

File tree

16 files changed

+699
-0
lines changed

16 files changed

+699
-0
lines changed

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# Linux start script should use lf
5+
/gradlew text eol=lf
6+
7+
# These are Windows script files and should use crlf
8+
*.bat text eol=crlf
9+

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Automatically build the project and run any configured tests for every push
2+
# and submitted pull request. This can help catch issues that only occur on
3+
# certain platforms or Java versions, and provides a first line of defence
4+
# against bad commits.
5+
6+
name: build
7+
on: [pull_request, push]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
# Use these Java versions
14+
java: [
15+
21, # Current Java LTS
16+
]
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- name: checkout repository
20+
uses: actions/checkout@v4
21+
- name: validate gradle wrapper
22+
uses: gradle/wrapper-validation-action@v2
23+
- name: setup jdk ${{ matrix.java }}
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: ${{ matrix.java }}
27+
distribution: 'microsoft'
28+
- name: make gradle wrapper executable
29+
run: chmod +x ./gradlew
30+
- name: build
31+
run: ./gradlew build
32+
- name: capture build artifacts
33+
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: Artifacts
37+
path: build/libs/

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# gradle
2+
3+
.gradle/
4+
build/
5+
out/
6+
classes/
7+
8+
# eclipse
9+
10+
*.launch
11+
12+
# idea
13+
14+
.idea/
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# vscode
20+
21+
.settings/
22+
.vscode/
23+
bin/
24+
.classpath
25+
.project
26+
27+
# macos
28+
29+
*.DS_Store
30+
31+
# fabric
32+
33+
run/
34+
35+
# java
36+
37+
hs_err_*.log
38+
replay_*.log
39+
*.hprof
40+
*.jfr

build.gradle

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
plugins {
2+
id 'fabric-loom' version '1.9-SNAPSHOT'
3+
id 'maven-publish'
4+
id "org.jetbrains.kotlin.jvm" version "2.1.0"
5+
}
6+
7+
version = project.mod_version
8+
group = project.maven_group
9+
10+
base {
11+
archivesName = project.archives_base_name
12+
}
13+
14+
repositories {
15+
// Add repositories to retrieve artifacts from in here.
16+
// You should only use this when depending on other mods because
17+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
18+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
19+
// for more information about repositories.
20+
}
21+
22+
dependencies {
23+
// To change the versions see the gradle.properties file
24+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
25+
mappings loom.officialMojangMappings()
26+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
27+
28+
// Fabric API. This is technically optional, but you probably want it anyway.
29+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
30+
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
31+
}
32+
33+
processResources {
34+
inputs.property "version", project.version
35+
36+
filesMatching("fabric.mod.json") {
37+
expand "version": project.version
38+
}
39+
}
40+
41+
tasks.withType(JavaCompile).configureEach {
42+
it.options.release = 21
43+
}
44+
45+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
46+
kotlinOptions {
47+
jvmTarget = 21
48+
}
49+
}
50+
51+
java {
52+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
53+
// if it is present.
54+
// If you remove this line, sources will not be generated.
55+
withSourcesJar()
56+
57+
sourceCompatibility = JavaVersion.VERSION_21
58+
targetCompatibility = JavaVersion.VERSION_21
59+
}
60+
61+
jar {
62+
from("LICENSE") {
63+
rename { "${it}_${project.base.archivesName.get()}" }
64+
}
65+
}
66+
67+
// configure the maven publication
68+
publishing {
69+
publications {
70+
create("mavenJava", MavenPublication) {
71+
artifactId = project.archives_base_name
72+
from components.java
73+
}
74+
}
75+
76+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
77+
repositories {
78+
// Add repositories to publish to here.
79+
// Notice: This block does NOT have the same function as the block in the top level.
80+
// The repositories here will be used for publishing your artifact, not for
81+
// retrieving dependencies.
82+
}
83+
}

gradle.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx3G
3+
org.gradle.parallel=true
4+
5+
# Fabric Properties
6+
# check these on https://fabricmc.net/develop
7+
minecraft_version=1.21.4
8+
loader_version=0.16.9
9+
fabric_kotlin_version=1.13.0+kotlin.2.1.0
10+
11+
# Dependencies
12+
fabric_version=0.112.2+1.21.4
13+
14+
# Mod Properties
15+
mod_version=1.0.0
16+
maven_group=btw.lowercase.chit
17+
archives_base_name=chit

gradle/wrapper/gradle-wrapper.jar

42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)