buildscript { repositories { jcenter() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'maven-publish' version = "2.0.0" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions-1.15.2" sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' minecraft { mappings channel: "stable", version: "60-1.15" runs { client = { properties 'forge.logging.markers': '' properties 'forge.logging.console.level': 'debug' workingDirectory project.file('run').canonicalPath source sourceSets.main } server = { properties 'forge.logging.markers': '' properties 'forge.logging.console.level': 'debug' workingDirectory project.file('run/server').canonicalPath source sourceSets.main } data = { workingDirectory project.file("run/data").canonicalPath args "--mod", "actuallyadditions", "--all", "--output", "\"" + file("src/generated/resources").toString() + "\"", "--validate", "--existing", "\"" + sourceSets.main.resources.srcDirs[0] + "\"" mods { actuallyadditions { source sourceSets.main } } } } } repositories { maven { // location of the maven that hosts JEI files name = "Progwml6 maven" url = "https://dvs1.progwml6.com/files/maven/" } maven { // location of a maven mirror for JEI files, as a fallback name = "ModMaven" url = "https://modmaven.k-4u.nl" } } dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" // compile against the JEI API but do not include it at runtime compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // at runtime, use the full JEI jar runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") } jar { manifest { attributes(["Specification-Title": "actuallyadditions", "Specification-Vendor": "Ellpeck", "Specification-Version": "24.0", "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"Ellpeck", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],) } } task deobfJar(type: Jar) { from(sourceSets.main.output) archiveName = "${baseName}-${version}-deobf.${extension}" } task sourcesJar(type: Jar) { from(sourceSets.main.allSource) archiveName = "${baseName}-${version}-sources.${extension}" } artifacts { archives deobfJar archives sourcesJar } publishing { publications { mavenJava(MavenPublication) { groupId project.group artifactId project.archivesBaseName version project.version from components.java artifact deobfJar { classifier 'deobf' } artifact sourcesJar { classifier 'sources' } pom.withXml { def node = asNode() if (node.dependencies.size() > 0) node.remove(node.dependencies) } } } repositories { maven { url "file://" + System.getenv("local_maven") } } }