Loom needs an explicit mappings entry, and Fabric loader / API must be declared with modImplementation so they get remapped against the active mappings; the previous commit dropped both, which left the build with no mappings at all and unremapped Fabric jars. Reference the loom_version property in the plugin block too so it tracks gradle.properties.
66 lines
1.3 KiB
Groovy
66 lines
1.3 KiB
Groovy
plugins {
|
|
id 'net.fabricmc.fabric-loom' version "${project.loom_version}"
|
|
id 'maven-publish'
|
|
}
|
|
|
|
version = project.mod_version
|
|
group = project.maven_group
|
|
|
|
base {
|
|
archivesName = project.archives_base_name
|
|
}
|
|
|
|
loom {
|
|
splitEnvironmentSourceSets()
|
|
|
|
mods {
|
|
"clientirc" {
|
|
sourceSet sourceSets.main
|
|
sourceSet sourceSets.client
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url = 'https://maven.fabricmc.net/'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings loom.officialMojangMappings()
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property 'version', project.version
|
|
|
|
filesMatching('fabric.mod.json') {
|
|
expand 'version': project.version
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.release = 25
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_25
|
|
targetCompatibility = JavaVersion.VERSION_25
|
|
withSourcesJar()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
}
|
|
}
|