2014-11-25 20:01:48 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Applied Energistics 2.
|
2015-09-29 15:47:55 +02:00
|
|
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
2014-11-25 20:01:48 +01:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
2014-09-26 16:14:44 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2015-04-25 10:01:09 +02:00
|
|
|
mavenLocal()
|
2015-09-29 15:47:55 +02:00
|
|
|
jcenter()
|
2016-02-16 19:51:33 +01:00
|
|
|
mavenCentral()
|
2014-09-24 02:30:22 +02:00
|
|
|
maven {
|
|
|
|
name = "forge"
|
|
|
|
url = "http://files.minecraftforge.net/maven"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2017-07-06 01:57:19 +02:00
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
|
|
|
}
|
2016-01-01 01:46:06 +01:00
|
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
|
2016-02-16 21:00:12 +01:00
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2016-10-01 23:53:45 +02:00
|
|
|
apply from: 'gradle/scripts/dependencies.gradle'
|
2016-01-01 01:46:06 +01:00
|
|
|
apply from: 'gradle/scripts/artifacts.gradle'
|
2016-10-01 23:53:45 +02:00
|
|
|
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
|
|
|
|
2015-04-29 20:43:01 +02:00
|
|
|
version = aeversion + "-" + aechannel + "-" + aebuild
|
|
|
|
group = aegroup
|
|
|
|
archivesBaseName = aebasename
|
2014-09-24 02:30:22 +02:00
|
|
|
|
|
|
|
// Add Coremod Manifest
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
2016-11-26 14:08:10 +01:00
|
|
|
attributes 'FMLAT': 'appeng_at.cfg'
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
|
|
|
|
2016-11-06 21:55:58 +01:00
|
|
|
from sourceSets.api.output
|
|
|
|
dependsOn apiClasses
|
|
|
|
|
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"
|
2016-11-26 14:08:10 +01:00
|
|
|
include "META-INF/appeng_at.cfg"
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
2016-11-26 14:08:10 +01:00
|
|
|
coreMod = "appeng.coremod.AppEngCore"
|
2016-02-16 22:24:49 +01:00
|
|
|
|
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"
|
2016-01-10 01:58:42 +01:00
|
|
|
mappings = mcp_mappings
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
2016-11-06 21:55:58 +01:00
|
|
|
api
|
|
|
|
main
|
2016-11-06 22:22:34 +01:00
|
|
|
}
|
|
|
|
|
2016-10-02 02:09:10 +02:00
|
|
|
processResources
|
|
|
|
{
|
|
|
|
// this will ensure that this task is redone when the versions change.
|
|
|
|
inputs.property "version", project.version
|
|
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
|
2014-09-24 02:30:22 +02:00
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
2016-10-02 02:09:10 +02:00
|
|
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
|
|
|
}
|
|
|
|
|
|
|
|
// copy everything else, thats not the mcmod.info
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|
2016-11-26 14:08:10 +01:00
|
|
|
|
|
|
|
// move access transformer to META-INF
|
|
|
|
rename '(.+_at.cfg)', 'META-INF/$1'
|
2014-09-24 02:30:22 +02:00
|
|
|
}
|