/* * 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 "org.jetbrains.kotlin.jvm" id "org.sonarqube" version "2.8" id "jacoco" } repositories { mavenLocal() jcenter() mavenCentral() maven { url = "http://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 } unported { 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) unportedCompile.extendsFrom(compileClasspath) } 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 "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" modImplementation "alexiil.mc.lib:libblockattributes-all:0.7.0" modImplementation "me.shedaniel:RoughlyEnoughItems:4.6.6" modImplementation "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" } } // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. // If you remove this task, sources will not be generated. task sourcesJar(type: Jar, dependsOn: classes) { classifier = "sources" from sourceSets.main.allSource } jar { from "LICENSE" } compileKotlin.kotlinOptions.jvmTarget = "1.8" publishing { publications { mavenJava(MavenPublication) { // 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" } } }