plugins { id 'java' id 'maven-publish' id 'idea' id 'fabric-loom' version '1.6-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" } } 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" } 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") } } }