102 lines
2.7 KiB
Groovy
102 lines
2.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'idea'
|
|
id 'fabric-loom' version '1.10-SNAPSHOT'
|
|
}
|
|
base {
|
|
archivesName = "${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')
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://maven.siphalor.de/"
|
|
name "Siphalor's Maven"
|
|
}
|
|
|
|
maven { url "https://maven.terraformersmc.com/releases/" }
|
|
}
|
|
|
|
|
|
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")
|
|
|
|
//modRuntimeOnly "de.siphalor:amecsapi-1.20:1.5.6+mc1.20.2"
|
|
|
|
modApi("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
modApi "com.terraformersmc:modmenu:13.0.0-beta.1"
|
|
}
|
|
|
|
loom {
|
|
if (project(":Common").file("src/main/resources/${mod_id}.accesswidener").exists()) {
|
|
accessWidenerPath.set(project(":Common").file("src/main/resources/${mod_id}.accesswidener"))
|
|
}
|
|
mixin {
|
|
defaultRefmapName.set("${mod_id}.refmap.json")
|
|
}
|
|
runs {
|
|
client {
|
|
client()
|
|
setConfigName("Fabric Client")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
server {
|
|
server()
|
|
setConfigName("Fabric Server")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
source(project(":Common").sourceSets.main.allSource)
|
|
}
|
|
tasks.withType(Javadoc).configureEach {
|
|
source(project(":Common").sourceSets.main.allJava)
|
|
}
|
|
tasks.named("sourcesJar", Jar) {
|
|
from(project(":Common").sourceSets.main.allSource)
|
|
}
|
|
|
|
processResources {
|
|
from project(":Common").sourceSets.main.resources
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifactId base.archivesName.get()
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url "file://" + System.getenv("local_maven")
|
|
}
|
|
}
|
|
}
|