Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4

[*.json]
indent_size = 2
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

# idea
/.idea
/out
*.ipr
*.iws
*.iml

# gradle
/build
/.gradle
/gradle
/gradlew
/gradlew.bat

# other
eclipse
run
annotations
logs
89 changes: 53 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,61 +1,78 @@
plugins {
id 'fabric-loom' version '0.4-SNAPSHOT'
id 'maven-publish'
id 'fabric-loom' version '1.0-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven {
url "https://maven.terraformersmc.com/releases"
}
maven {
url "https://maven.shedaniel.me/"
}
}

dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modApi "me.sargunvohra.mcmods:autoconfig1u:3.2.0-unstable"
modImplementation "io.github.prospector:modmenu:1.14.6+build.31"
modApi ("me.shedaniel.cloth:config-2:4.7.0-unstable") {
exclude(group: "net.fabricmc.fabric-api")
}
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
implementation "com.electronwill.night-config:toml:${project.night_config_version}"
include "com.electronwill.night-config:core:${project.night_config_version}"
include "com.electronwill.night-config:toml:${project.night_config_version}"
}

processResources {
inputs.property "version", project.version
sourceSets {
main {
java.srcDirs += "src/common/java"
resources.srcDirs += "src/common/resources"
}
}

from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}
processResources {
inputs.property "version", project.version

from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

// 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
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
classifier = "sources"
from sourceSets.main.allSource
}

ext {
autoSignProfile = "reauth"
autoSignTarget = tasks.remapJar.archivePath
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}
26 changes: 15 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.2
yarn_mappings=1.16.2+build.1
loader_version=0.9.1+build.205

# check these on https://fabricmc.net/use
minecraft_version=1.19.2
# https://maven.fabricmc.net/net/fabricmc/yarn/
yarn_mappings=1.19.2+build.9
# https://maven.fabricmc.net/net/fabricmc/fabric-loader/
loader_version=0.14.9
# Mod Properties
mod_version = 3.9.3
archives_base_name = ReAuth-1.16-Fabric

mod_version=4.1.0-Fabric
maven_group=technicianlp.reauth
archives_base_name=ReAuth-1.19.2-Fabric
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.19.0+build.398-1.16
# currently not on the main fabric site, check on the maven:
# https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.61.0+1.19.2
cloth_config_version=8.2.88
modmenu_version=4.0.6
night_config_version=3.6.6
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading