1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import net.fabricmc.loom.task.RemapJar
- plugins {
- id 'fabric-loom' version '0.2.0-SNAPSHOT'
- id "com.github.johnrengelman.shadow" version "4.0.3"
- id "com.matthewprenger.cursegradle" version "1.1.2"
- }
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- group = "me.shedaniel"
- archivesBaseName = "RoughlyEnoughItems"
- version = project.mod_version
- minecraft {
- }
- repositories {
- maven { url "https://tehnut.info/maven/" }
- maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
- maven { url "https://maven.jamieswhiteshirt.com/libs-release/" }
- maven { url "https://minecraft.curseforge.com/api/maven" }
- }
- processResources {
- filesMatching('fabric.mod.json') {
- expand 'version': project.version
- }
- inputs.property "version", project.version
- }
- configurations {
- contained {
- transitive = false
- }
- }
- shadowJar {
- configurations = [project.configurations.contained]
- }
- task remapShadowJar(type: RemapJar) {
- jar = shadowJar.archivePath
- }
- tasks.remapShadowJar.dependsOn tasks.shadowJar
- dependencies {
- minecraft "com.mojang:minecraft:${project.minecraft_version}"
- mappings "net.fabricmc:yarn:${project.yarn_version}"
- modCompile "net.fabricmc:fabric-loader:${project.fabricloader_version}"
- // modCompile "com.jamieswhiteshirt:developer-mode:${project.developermode_version}"
- modCompile "info.tehnut.pluginloader:plugin-loader:${project.pluginloader_version}"
- modCompile "net.fabricmc:fabric:${project.fabric_version}"
- modCompile "cloth:Cloth:${cloth_version}"
- compile "blue.endless:jankson:${project.jankson_version}"
- contained "blue.endless:jankson:${project.jankson_version}"
- }
- curseforge {
- if (project.hasProperty("curseForgeApiKey")) {
- apiKey = project.properties.curseForgeApiKey
- }
- project {
- id = "310111"
- changelogType = "markdown"
- changelog = file("CHANGELOG.md")
- releaseType = "release"
- addGameVersion "1.14-Snapshot"
- mainArtifact(remapShadowJar.jar) {
- displayName = "[Fabric $project.minecraft_version] v$project.version"
- relations {
- requiredDependency "fabric"
- optionalDependency "pluginloader"
- tool "rei-addons"
- }
- }
- }
- options {
- forgeGradleIntegration = false
- }
- }
- afterEvaluate {
- // CurseGradle generates tasks in afterEvaluate for each project
- // There isn't really any other way to make it depend on a task unless it is an AbstractArchiveTask
- tasks.curseforge310111.dependsOn remapShadowJar
- }
|