84 lines
2.1 KiB
Groovy
84 lines
2.1 KiB
Groovy
plugins {
|
|
id 'fabric-loom' version '1.0-SNAPSHOT'
|
|
id 'maven-publish'
|
|
id 'idea'
|
|
}
|
|
|
|
archivesBaseName = "${mod_id}-fabric-${minecraft_version}"
|
|
|
|
apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle'
|
|
|
|
if (project.hasProperty('secretFile')) {
|
|
loadSecrets(new File((String) findProperty('secretFile')))
|
|
}
|
|
if (System.getenv('BUILD_NUMBER') != null) {
|
|
version += "." + System.getenv('BUILD_NUMBER')
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${minecraft_version}"
|
|
mappings loom.layered() {
|
|
officialMojangMappings()
|
|
parchment("org.parchmentmc.data:parchment-${parchment_mappings_fabric}@zip")
|
|
}
|
|
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
|
|
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
|
|
implementation project(":Common")
|
|
}
|
|
|
|
loom {
|
|
runs {
|
|
client {
|
|
client()
|
|
setConfigName("Fabric Client")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
server {
|
|
server()
|
|
setConfigName("Fabric Server")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
var refmap_target = archivesBaseName + "-"
|
|
|
|
processResources {
|
|
from project(":Common").sourceSets.main.resources
|
|
inputs.property "version", project.version
|
|
inputs.property "refmap_target", refmap_target
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
|
|
filesMatching("carryon.mixins.json") {
|
|
expand "refmap_target": refmap_target
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
source(project(":Common").sourceSets.main.allSource)
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
groupId project.group
|
|
artifactId project.archivesBaseName
|
|
version project.version
|
|
from components.java
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "file://" + System.getenv("local_maven")
|
|
}
|
|
}
|
|
}
|