-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builds off of #36. Also syncs with latest mod template and updates dependencies.
- Loading branch information
1 parent
0fa2fce
commit 1c19cd1
Showing
21 changed files
with
360 additions
and
278 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
File renamed without changes
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 |
---|---|---|
@@ -1,141 +1,140 @@ | ||
plugins { | ||
id 'fabric-loom' apply false | ||
id 'io.github.juuxel.loom-quiltflower' apply false | ||
id 'fabric-loom' | ||
id 'checkstyle' | ||
id 'com.diffplug.spotless' | ||
} | ||
|
||
|
||
allprojects { | ||
apply plugin: 'fabric-loom' | ||
apply plugin: 'io.github.juuxel.loom-quiltflower' | ||
apply plugin: 'checkstyle' | ||
|
||
checkstyle { | ||
configFile = file("${rootDir}/checkstyle.xml") | ||
toolVersion = project.checkstyle_version | ||
} | ||
version = rootProject.mod_version | ||
group = rootProject.maven_group | ||
|
||
base { | ||
archivesName = project.archives_base_name | ||
} | ||
|
||
version = rootProject.mod_version | ||
group = rootProject.maven_group | ||
archivesBaseName = rootProject.archives_base_name | ||
|
||
checkstyle { | ||
configFile = file("${rootDir}/checkstyle.xml") | ||
toolVersion = project.checkstyle_version | ||
} | ||
|
||
configurations { | ||
modRuntimeOnly { | ||
transitive = true | ||
exclude module: 'fabric-loader' | ||
exclude module: 'fabric-api-base' | ||
} | ||
spotless { | ||
java { | ||
removeUnusedImports() | ||
importOrder("java", "javax", "", "net.minecraft", "com.github.reviversmc") | ||
indentWithTabs() | ||
trimTrailingWhitespace() | ||
} | ||
} | ||
|
||
repositories { | ||
if (project.use_third_party_mods == 'true') { | ||
maven { | ||
name = 'Modrinth' | ||
url = 'https://api.modrinth.com/maven' | ||
content { | ||
includeGroup 'maven.modrinth' | ||
} | ||
} | ||
maven { | ||
url = 'https://cursemaven.com' | ||
content { | ||
includeGroup 'curse.maven' | ||
} | ||
} | ||
} | ||
maven { | ||
name "Siphalor's Maven" | ||
url 'https://maven.siphalor.de/' | ||
} | ||
maven { | ||
name = 'TerraformersMC' | ||
url = 'https://maven.terraformersmc.com/releases' | ||
} | ||
maven { | ||
url = 'https://maven.shedaniel.me/' | ||
} | ||
|
||
repositories { | ||
if (project.use_third_party_mods == 'true') { | ||
maven { | ||
name = 'JitPack' | ||
url = 'https://jitpack.io' | ||
name = 'Modrinth' | ||
url = 'https://api.modrinth.com/maven' | ||
content { | ||
includeGroup 'maven.modrinth' | ||
} | ||
} | ||
maven { | ||
name = 'NucleoidMC' | ||
url = 'https://maven.nucleoid.xyz/' | ||
url = 'https://cursemaven.com' | ||
content { | ||
includeGroup 'curse.maven' | ||
} | ||
} | ||
mavenCentral() | ||
} | ||
maven { | ||
name "Siphalor's Maven" | ||
url 'https://maven.siphalor.de/' | ||
} | ||
maven { | ||
name = 'TerraformersMC' | ||
url = 'https://maven.terraformersmc.com/releases' | ||
} | ||
maven { | ||
url = 'https://maven.shedaniel.me/' | ||
} | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}" | ||
dependencies { | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
|
||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
// Fabric | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}" | ||
modImplementation fabricApi.module('fabric-api-base', project.fabric_api_version) | ||
modImplementation fabricApi.module('fabric-lifecycle-events-v1', project.fabric_api_version) | ||
modImplementation fabricApi.module('fabric-key-binding-api-v1', project.fabric_api_version) | ||
|
||
// Required Fabric API modules | ||
modImplementation fabricApi.module('fabric-api-base', project.fabric_api_version) | ||
modImplementation fabricApi.module('fabric-lifecycle-events-v1', project.fabric_api_version) | ||
modImplementation fabricApi.module('fabric-key-binding-api-v1', project.fabric_api_version) | ||
// Other mods | ||
modCompileOnly "de.siphalor:amecsapi-1.19:${project.amecs_api_version}" | ||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" | ||
|
||
// Amecs API | ||
//modImplementation "de.siphalor:amecsapi-1.19:${project.amecs_api_version}" | ||
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { | ||
exclude(group: 'net.fabricmc.fabric-api') | ||
} | ||
|
||
// ModMenu | ||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" | ||
// Cloth Config | ||
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { | ||
exclude(group: 'net.fabricmc.fabric-api') | ||
} | ||
|
||
if (project.use_third_party_mods == 'true') { | ||
configurations { | ||
modRuntimeOnly { | ||
exclude module: 'fabric-lifecycle-events-v1' | ||
exclude module: 'fabric-key-binding-api-v1' | ||
} | ||
if (project.use_third_party_mods == 'true') { | ||
configurations { | ||
modRuntimeOnly { | ||
transitive = true | ||
exclude module: 'fabric-loader' | ||
exclude module: 'fabric-lifecycle-events-v1' | ||
exclude module: 'fabric-key-binding-api-v1' | ||
} | ||
|
||
modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" | ||
//modRuntimeOnly "maven.modrinth:sodium:${project.sodium_version}" | ||
//modRuntimeOnly "maven.modrinth:lithium:${project.lithium_version}" | ||
modRuntimeOnly "maven.modrinth:starlight:${project.starlight_version}" | ||
//modRuntimeOnly "maven.modrinth:smoothboot-fabric:${project.smoothboot_version}" | ||
modRuntimeOnly "curse.maven:no-fade-452768:${project.no_fade_version}" | ||
} | ||
|
||
// Comment out the following line to check vanilla compatibility | ||
modRuntimeOnly "de.siphalor:amecsapi-1.19:${project.amecs_api_version}" | ||
|
||
// Use full Fabric API bundle while debugging, since transitive deps aren't always declared correctly | ||
modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" | ||
|
||
modRuntimeOnly "maven.modrinth:sodium:${project.sodium_version}" | ||
modRuntimeOnly "maven.modrinth:lithium:${project.lithium_version}" | ||
modRuntimeOnly "maven.modrinth:starlight:${project.starlight_version}" | ||
modRuntimeOnly "maven.modrinth:ferrite-core:${project.ferritecore_version}" | ||
modRuntimeOnly "curse.maven:smooth-boot-415758:${project.smoothboot_version}" | ||
modRuntimeOnly "curse.maven:no-fade-452768:${project.no_fade_version}" | ||
} | ||
} | ||
|
||
|
||
processResources { | ||
inputs.property 'version', project.version | ||
processResources { | ||
inputs.property 'version', project.version | ||
|
||
filesMatching('fabric.mod.json') { | ||
expand 'version': project.version | ||
} | ||
filesMatching('fabric.mod.json') { | ||
expand 'version': project.version | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
// 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. | ||
// If Javadoc is generated, this must be specified in that task too. | ||
it.options.encoding = 'UTF-8' | ||
from("${rootDir}/assets/icon.png") { | ||
into 'assets/toomanybinds/' | ||
} | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
tasks.withType(JavaCompile).configureEach { | ||
// 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. | ||
// If Javadoc is generated, this must be specified in that task too. | ||
it.options.encoding = 'UTF-8' | ||
|
||
// If this mod is going to be a library, then it should also generate Javadocs in order to aid | ||
// with development. Uncomment this line to generate them. | ||
// withJavadocJar() | ||
} | ||
// Minecraft 1.18-pre2 upwards uses Java 17. | ||
it.options.release = 17 | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
processResources { | ||
from("${rootDir}/assets/icon.png") { | ||
into "assets/toomanybinds/" | ||
} | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
|
||
// If this mod is going to be a library, then it should also generate Javadocs in order to aid | ||
// with development. Uncomment this line to generate them. | ||
// withJavadocJar() | ||
} |
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
Oops, something went wrong.