Skip to content

Commit 40c2c10

Browse files
committed
Added main functionality
Signed-off-by: Nikita Skobelevs <nikita.skobelevs@gmail.com>
1 parent 023e851 commit 40c2c10

12 files changed

Lines changed: 476 additions & 0 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Nikita Skobelevs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

build.gradle

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
plugins {
2+
id 'fabric-loom' version '0.4-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+
minecraft {
14+
}
15+
16+
dependencies {
17+
//to change the versions see the gradle.properties file
18+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
19+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
20+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
21+
}
22+
23+
processResources {
24+
inputs.property "version", project.version
25+
26+
from(sourceSets.main.resources.srcDirs) {
27+
include "fabric.mod.json"
28+
expand "version": project.version
29+
}
30+
31+
from(sourceSets.main.resources.srcDirs) {
32+
exclude "fabric.mod.json"
33+
}
34+
}
35+
36+
// ensure that the encoding is set to UTF-8, no matter what the system default is
37+
// this fixes some edge cases with special characters not displaying correctly
38+
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
39+
tasks.withType(JavaCompile) {
40+
options.encoding = "UTF-8"
41+
}
42+
43+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
44+
// if it is present.
45+
// If you remove this task, sources will not be generated.
46+
task sourcesJar(type: Jar, dependsOn: classes) {
47+
classifier = "sources"
48+
from sourceSets.main.allSource
49+
}
50+
51+
jar {
52+
from "LICENSE"
53+
}
54+
55+
// configure the maven publication
56+
publishing {
57+
publications {
58+
mavenJava(MavenPublication) {
59+
// add all the jars that should be included when publishing to maven
60+
artifact(jar) {
61+
builtBy remapJar
62+
}
63+
artifact("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}.jar"){
64+
builtBy remapJar
65+
}
66+
artifact(sourcesJar) {
67+
builtBy remapSourcesJar
68+
}
69+
}
70+
}
71+
72+
// select the repositories you want to publish to
73+
repositories {
74+
// uncomment to publish to the local maven
75+
// mavenLocal()
76+
}
77+
}

gradle.properties

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
org.gradle.jvmargs = -Xmx1G
2+
3+
#Fabric properties
4+
minecraft_version = 1.16.1
5+
yarn_mappings = 1.16.1+build.21
6+
loader_version = 0.9.0+build.204
7+
8+
#Mod properties
9+
mod_version = 1.0.0
10+
maven_group = nskobelevs.nofireoverlay
11+
archives_base_name = nofireoverlay

gradle/wrapper/gradle-wrapper.jar

57.3 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.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 183 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)