Skip to content

Commit f712940

Browse files
committed
Initial commit
0 parents  commit f712940

52 files changed

Lines changed: 946 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
1.8, # Minimum supported by Minecraft
16+
11, # Current Java LTS
17+
15 # Latest version
18+
]
19+
# and run on both Linux and Windows
20+
os: [ubuntu-20.04, windows-latest]
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- name: checkout repository
24+
uses: actions/checkout@v2
25+
- name: validate gradle wrapper
26+
uses: gradle/wrapper-validation-action@v1
27+
- name: setup jdk ${{ matrix.java }}
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: ${{ matrix.java }}
31+
- name: make gradle wrapper executable
32+
if: ${{ runner.os != 'Windows' }}
33+
run: chmod +x ./gradlew
34+
- name: build
35+
run: ./gradlew build
36+
- name: capture build artifacts
37+
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS
38+
uses: actions/upload-artifact@v2
39+
with:
40+
name: Artifacts
41+
path: build/libs/

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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/

build.gradle

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
plugins {
2+
id 'fabric-loom' version '0.5-SNAPSHOT'
3+
id 'maven-publish'
4+
}
5+
6+
sourceCompatibility = JavaVersion.VERSION_1_8
7+
targetCompatibility = JavaVersion.VERSION_1_8
8+
9+
archivesBaseName = project.archives_base_name
10+
version = project.mod_version
11+
group = project.maven_group
12+
13+
repositories {
14+
// Add repositories to retrieve artifacts from in here.
15+
// You should only use this when depending on other mods because
16+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
17+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
18+
// for more information about repositories.
19+
}
20+
21+
dependencies {
22+
// To change the versions see the gradle.properties file
23+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
24+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
25+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
26+
27+
// Fabric API. This is technically optional, but you probably want it anyway.
28+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
29+
30+
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
31+
// You may need to force-disable transitiveness on them.
32+
}
33+
34+
processResources {
35+
inputs.property "version", project.version
36+
37+
filesMatching("fabric.mod.json") {
38+
expand "version": project.version
39+
}
40+
}
41+
42+
tasks.withType(JavaCompile).configureEach {
43+
// ensure that the encoding is set to UTF-8, no matter what the system default is
44+
// this fixes some edge cases with special characters not displaying correctly
45+
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
46+
// If Javadoc is generated, this must be specified in that task too.
47+
it.options.encoding = "UTF-8"
48+
49+
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
50+
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
51+
// We'll use that if it's available, but otherwise we'll use the older option.
52+
def targetVersion = 8
53+
if (JavaVersion.current().isJava9Compatible()) {
54+
it.options.release = targetVersion
55+
}
56+
}
57+
58+
java {
59+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
60+
// if it is present.
61+
// If you remove this line, sources will not be generated.
62+
withSourcesJar()
63+
}
64+
65+
jar {
66+
from("LICENSE") {
67+
rename { "${it}_${project.archivesBaseName}"}
68+
}
69+
}
70+
71+
// configure the maven publication
72+
publishing {
73+
publications {
74+
mavenJava(MavenPublication) {
75+
// add all the jars that should be included when publishing to maven
76+
artifact(remapJar) {
77+
builtBy remapJar
78+
}
79+
artifact(sourcesJar) {
80+
builtBy remapSourcesJar
81+
}
82+
}
83+
}
84+
85+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
86+
repositories {
87+
// Add repositories to publish to here.
88+
// Notice: This block does NOT have the same function as the block in the top level.
89+
// The repositories here will be used for publishing your artifact, not for
90+
// retrieving dependencies.
91+
}
92+
}

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=-Xmx1G
3+
4+
# Fabric Properties
5+
minecraft_version=1.16.4
6+
yarn_mappings=1.16.4+build.9
7+
loader_version=0.11.1
8+
9+
#Fabric api
10+
fabric_version=0.30.3+1.16
11+
# Mod Properties
12+
mod_version = 0.0.1
13+
maven_group = InfernalSpark.nukes.mod
14+
archives_base_name = nukes-mod
15+
16+
# Dependencies
17+
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api

gradle/wrapper/gradle-wrapper.jar

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

gradlew

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)