2014-11-25 20:01:48 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Applied Energistics 2.
|
|
|
|
* Copyright (c) 2013 - 2014, 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-26 16:14:44 +02:00
|
|
|
apply plugin: 'forge'
|
2014-09-24 02:30:22 +02:00
|
|
|
|
2014-09-26 16:14:44 +02:00
|
|
|
apply from: 'gradle/scripts/dependencies.gradle'
|
|
|
|
apply from: 'gradle/scripts/artifacts.gradle'
|
|
|
|
apply from: 'gradle/scripts/autoinstallruntime.gradle'
|
2015-04-06 19:42:20 +02:00
|
|
|
apply from: 'gradle/scripts/integration.gradle'
|
2015-04-25 10:01:09 +02:00
|
|
|
apply from: 'gradle/scripts/optional.gradle'
|
2014-09-24 02:30:22 +02:00
|
|
|
|
2014-09-26 16:14:44 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2015-04-25 10:01:09 +02:00
|
|
|
mavenLocal()
|
2014-09-24 02:30:22 +02:00
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven {
|
|
|
|
name = "forge"
|
|
|
|
url = "http://files.minecraftforge.net/maven"
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
name = "sonatype"
|
|
|
|
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-15 17:36:08 +02:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2014-09-24 02:30:22 +02:00
|
|
|
|
2015-04-29 20:43:01 +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
|
2014-09-28 18:45:55 +02:00
|
|
|
if (hasProperty("teamcity")) {
|
2014-09-28 18:55:59 +02:00
|
|
|
version = teamcity["build.number"]
|
2014-09-28 20:53:36 +02:00
|
|
|
|
|
|
|
// Fix for main branch being built
|
2014-09-28 20:58:20 +02:00
|
|
|
version = version.replaceAll("/", "-")
|
2014-09-28 18:45:55 +02:00
|
|
|
}
|
|
|
|
|
2014-09-24 02:30:22 +02:00
|
|
|
// Add Coremod Manifest
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
|
|
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
|
|
|
}
|
|
|
|
|
2014-09-26 16:14:44 +02:00
|
|
|
// 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 {
|
2015-04-29 20:43:01 +02:00
|
|
|
version = minecraft_version + "-" + forge_version
|
2014-09-24 02:30:22 +02:00
|
|
|
|
2015-03-09 17:35:19 +01:00
|
|
|
replaceIn "AEConfig.java"
|
2016-01-03 14:09:34 +01:00
|
|
|
replaceIn "package-info.java"
|
|
|
|
|
2014-09-24 02:30:22 +02:00
|
|
|
replace "@version@", project.version
|
2016-01-03 14:09:34 +01:00
|
|
|
replace "@aeversion@", aeversion
|
2015-04-29 20:43:01 +02:00
|
|
|
replace "@aechannel@", aechannel
|
2016-01-03 14:09:34 +01:00
|
|
|
replace "@aebuild@", aebuild
|
2014-09-24 02:30:22 +02:00
|
|
|
|
2014-09-26 16:14:44 +02:00
|
|
|
// used when launching minecraft in dev env
|
2014-09-24 02:30:22 +02:00
|
|
|
runDir = "run"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
2014-09-26 16:14:44 +02:00
|
|
|
srcDirs += 'src/api/java'
|
2014-09-24 02:30:22 +02:00
|
|
|
srcDirs += 'src/main/java/'
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2014-09-26 16:14:44 +02:00
|
|
|
srcDir "src/main/resources/"
|
2015-08-15 17:19:56 +02:00
|
|
|
include "assets/appliedenergistics2/recipes/**/*.recipe",
|
2015-05-13 22:02:54 +02:00
|
|
|
"assets/appliedenergistics2/recipes/README.html",
|
2014-09-26 16:14:44 +02:00
|
|
|
"assets/appliedenergistics2/lang/*.lang",
|
|
|
|
"assets/appliedenergistics2/textures/blocks/*",
|
|
|
|
"assets/appliedenergistics2/textures/guis/*",
|
|
|
|
"assets/appliedenergistics2/textures/models/*",
|
2015-05-07 17:54:18 +02:00
|
|
|
"assets/appliedenergistics2/textures/items/*",
|
2015-05-07 17:46:38 +02:00
|
|
|
"assets/appliedenergistics2/meta/*",
|
2015-05-07 17:54:18 +02:00
|
|
|
"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'
|
2015-04-29 20:43:01 +02:00
|
|
|
expand 'version': project.version, 'mcversion': minecraft_version
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
|
|
|
}
|