Applied-Energistics-2-tiler.../build.gradle

115 lines
3.5 KiB
Groovy
Raw Normal View History

/*
* This file is part of Applied Energistics 2.
2015-09-29 15:47:55 +02:00
* 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 <http://www.gnu.org/licenses/lgpl>.
*/
2014-09-24 02:30:22 +02:00
buildscript {
repositories {
mavenLocal()
2015-09-29 15:47:55 +02:00
jcenter()
mavenCentral()
2014-09-24 02:30:22 +02:00
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
2014-09-24 02:30:22 +02:00
}
}
2016-01-01 01:46:06 +01:00
apply plugin: 'net.minecraftforge.gradle.forge'
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/autoinstallruntime.gradle'
apply from: 'gradle/scripts/integration.gradle'
apply from: 'gradle/scripts/optional.gradle'
2014-09-24 02:30:22 +02:00
2015-06-17 19:39:18 +02:00
sourceCompatibility = JavaVersion.VERSION_1_8
2016-01-01 01:46:06 +01:00
targetCompatibility = JavaVersion.VERSION_1_8
2014-09-24 02:30:22 +02:00
version = aeversion + "-" + aechannel + "-" + aebuild
group = aegroup
archivesBaseName = aebasename
2014-09-24 02:30:22 +02:00
2014-09-28 19:18:52 +02:00
// If TeamCity is running this build, lets set the version info
if (hasProperty("teamcity")) {
2014-09-28 18:55:59 +02:00
version = teamcity["build.number"]
// Fix for main branch being built
version = version.replaceAll("/", "-")
}
2014-09-24 02:30:22 +02:00
// Add Coremod Manifest
jar {
manifest {
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
// specify which files are really included, can control which APIs should be in
include "appeng/**"
include "assets/**"
include "mcmod.info"
include "pack.mcmeta"
2014-09-24 02:30:22 +02:00
}
minecraft {
version = minecraft_version + "-" + forge_version
2014-09-24 02:30:22 +02:00
replaceIn "AEConfig.java"
replaceIn "package-info.java"
2014-09-24 02:30:22 +02:00
replace "@version@", project.version
replace "@aeversion@", aeversion
replace "@aechannel@", aechannel
replace "@aebuild@", aebuild
2014-09-24 02:30:22 +02:00
// used when launching minecraft in dev env
2014-09-24 02:30:22 +02:00
runDir = "run"
2016-01-10 01:58:42 +01:00
mappings = mcp_mappings
2014-09-24 02:30:22 +02:00
}
sourceSets {
main {
java {
srcDirs += 'src/api/java'
2014-09-24 02:30:22 +02:00
srcDirs += 'src/main/java/'
}
resources {
srcDir "src/main/resources/"
2015-09-29 15:47:55 +02:00
include "assets/appliedenergistics2/recipes/**/*.recipe",
"assets/appliedenergistics2/recipes/README.html",
"assets/appliedenergistics2/lang/*.lang",
2015-09-29 15:47:55 +02:00
"assets/appliedenergistics2/blockstates/**/*.json",
"assets/appliedenergistics2/models/**/*.json",
"assets/appliedenergistics2/textures/**/*.png",
"assets/appliedenergistics2/textures/**/*.mcmeta",
2015-05-07 17:46:38 +02:00
"assets/appliedenergistics2/meta/*",
"mcmod.info",
"pack.mcmeta"
2014-09-24 02:30:22 +02:00
}
}
}
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
2014-09-24 02:30:22 +02:00
}
}