IDK
This commit is contained in:
82
build.gradle
82
build.gradle
@ -1,14 +1,16 @@
|
||||
plugins {
|
||||
id "fabric-loom" version "1.8+"
|
||||
alias libs.plugins.fabric.loom
|
||||
id "io.github.p03w.machete" version "1.+" // automatic jar compressing on build
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
base.archivesName = archives_base_name
|
||||
group = project.maven_group
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
String buildNumber = System.getenv("RUN_NUMBER")
|
||||
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||
version = "${mod_version}+${libs.versions.minecraft.get()}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
// Add repositories to retrieve artifacts from in here.
|
||||
@ -22,7 +24,10 @@ repositories {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
|
||||
maven {
|
||||
name = 'Quilt'
|
||||
url = 'https://maven.quiltmc.org/repository/release'
|
||||
}
|
||||
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
|
||||
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
|
||||
maven { url = "https://cursemaven.com" } // Forge Config API Port
|
||||
@ -49,54 +54,58 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
// Loom and Loader both use this block in order to gather more information about your mod.
|
||||
mods {
|
||||
// This should match your mod id.
|
||||
"ru.bitheaven.createairfabric" {
|
||||
// Tell Loom about each source set used by your mod here. This ensures that your mod's classes are properly transformed by Loader.
|
||||
sourceSet("main")
|
||||
// If you shade (directly include classes, not JiJ) a dependency into your mod, include it here using one of these methods:
|
||||
// dependency("com.example.shadowedmod:1.2.3")
|
||||
// configuration("exampleShadedConfigurationName")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
|
||||
dependencies {
|
||||
// To change the versions see the gradle.properties file
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings(loom.layered {
|
||||
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
|
||||
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
|
||||
it.officialMojangMappings { nameSyntheticMembers = false }
|
||||
})
|
||||
modImplementation("net.fabricmc:fabric-loader:${fabric_loader_version}")
|
||||
minecraft libs.minecraft
|
||||
mappings loom.layered {
|
||||
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
|
||||
officialMojangMappings()
|
||||
}
|
||||
|
||||
modImplementation libs.fabric.loader
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}")
|
||||
modImplementation libs.fabric.api
|
||||
|
||||
// Create - dependencies are added transitively
|
||||
modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_version}")
|
||||
modImplementation libs.create
|
||||
|
||||
// Thin Air
|
||||
modImplementation("maven.modrinth:thin-air:${thinair_version}")
|
||||
modImplementation libs.thinair
|
||||
|
||||
// Ad Astra
|
||||
modImplementation("maven.modrinth:ad-astra:${adastra_version}")
|
||||
modImplementation("maven.modrinth:botarium:${botarium_version}")
|
||||
modImplementation libs.adastra
|
||||
modImplementation libs.botarium
|
||||
|
||||
// Development QOL
|
||||
modLocalRuntime("maven.modrinth:lazydfu:${lazydfu_version}")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:${modmenu_version}")
|
||||
modLocalRuntime libs.lazydfu
|
||||
modLocalRuntime libs.modmenu
|
||||
|
||||
include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.4.1")))
|
||||
|
||||
// Recipe Viewers - Create Fabric supports JEI, REI, and EMI.
|
||||
// See root gradle.properties to choose which to use at runtime.
|
||||
switch (recipe_viewer.toLowerCase(Locale.ROOT)) {
|
||||
case "jei": modLocalRuntime("mezz.jei:jei-$minecraft_version-fabric:$jei_version"); break
|
||||
case "rei": modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$rei_version"); break
|
||||
case "emi": modLocalRuntime("dev.emi:emi-fabric:$emi_version"); break
|
||||
case "disabled": break
|
||||
default: println("Unknown recipe viewer specified: $recipe_viewer. Must be JEI, REI, EMI, or disabled.")
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
// require dependencies to be the version compiled against or newer
|
||||
Map<String, Object> properties = [
|
||||
"version": version,
|
||||
"fabric_loader_version": fabric_loader_version,
|
||||
"fabric_api_version": fabric_api_version,
|
||||
"create_version": create_version,
|
||||
"minecraft_version": minecraft_version
|
||||
"fabric_loader_version": libs.versions.fabric.loader.get(),
|
||||
"fabric_api_version": libs.versions.fabric.api.get(),
|
||||
"create_version": libs.versions.create.get(),
|
||||
"minecraft_version": libs.versions.minecraft.get()
|
||||
]
|
||||
|
||||
inputs.properties(properties)
|
||||
@ -112,11 +121,14 @@ tasks.withType(JavaCompile).configureEach {
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user