/* * This file is part of Applied Energistics 2. * Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved. * * Applied Energistics 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Applied Energistics 2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Applied Energistics 2. If not, see . */ plugins { id 'java' id 'fabric-loom' id 'maven-publish' id "com.diffplug.gradle.spotless" version "4.3.0" id "org.sonarqube" version "2.8" id "jacoco" } repositories { mavenLocal() jcenter() mavenCentral() maven { url = "https://maven.fabricmc.net/" } maven { name = "BuildCraft" url = "https://mod-buildcraft.com/maven" } maven { name = "HYWLA" url = "https://maven.tehnut.info/" } maven { name = 'Earthcomputer Mods' url = 'https://dl.bintray.com/earthcomputer/mods' } } sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 compileJava { sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 options.deprecation = false } // ensure everything uses UTF-8 and not some random codepage chosen by gradle compileJava.options.encoding = 'UTF-8' tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } group = artifact_group archivesBaseName = artifact_basename sourceSets { api main { compileClasspath += sourceSets.api.output runtimeClasspath += sourceSets.api.output resources { srcDir 'src/generated/resources' } } datagen { compileClasspath += sourceSets.api.output runtimeClasspath += sourceSets.api.output compileClasspath += sourceSets.main.output runtimeClasspath += sourceSets.main.output } test { compileClasspath += sourceSets.api.output runtimeClasspath += sourceSets.api.output } } configurations { apiCompile.extendsFrom(compileClasspath) datagenCompile.extendsFrom(compileClasspath) } apply from: 'gradle/scripts/spotless.gradle' minecraft { accessWidener "src/main/resources/appliedenergistics2.accesswidener" } dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" //Fabric api modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" modImplementation "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}" modImplementation "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}" modImplementation "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}" include "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}" include "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}" include "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}" modCompileOnly "me.shedaniel:RoughlyEnoughItems:4.6.6" modCompileOnly "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75" // modRuntimeOnly "me.shedaniel:RoughlyEnoughItems:4.6.6" // modRuntimeOnly "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75" implementation 'com.google.code.findbugs:jsr305:3.0.2' modImplementation 'net.earthcomputer:libstructure:1.3' // Or the latest version include 'net.earthcomputer:libstructure:1.3' // unit test dependencies testCompile "junit:junit:4.13" } processResources { inputs.property "version", project.version from(sourceSets.main.resources.srcDirs) { include "fabric.mod.json" expand "version": project.version } from(sourceSets.main.resources.srcDirs) { exclude "fabric.mod.json" } } apply from: 'gradle/scripts/artifacts.gradle' apply from: 'gradle/scripts/curseforge.gradle' publishing { publications { mavenJava(MavenPublication) { artifactId = 'appliedenergistics2-fabric' // add all the jars that should be included when publishing to maven artifact(remapJar) { builtBy remapJar } artifact(sourcesJar) { builtBy remapSourcesJar } } } } // configure the maven publication publishing { // select the repositories you want to publish to repositories { maven { credentials { username System.getenv("GITHUB_ACTOR") password System.getenv("GITHUB_TOKEN") } name = "GitHubPackages" url = "https://maven.pkg.github.com/AppliedEnergistics/Applied-Energistics-2" } } } import net.fabricmc.loom.task.RunClientTask; task generateData(type: RunClientTask, dependsOn: downloadAssets, group: "ae2") { classpath = configurations.runtimeClasspath classpath sourceSets.api.output classpath sourceSets.main.output classpath sourceSets.datagen.output systemProperty "appeng.generateData", "true" } build.dependsOn generateData