887339f7b8
Added appeng_at.cfg and updated build.gradle to correctly include the AT when building. Deleted the now useless ASMTweaker. Moved the coremod from package transformer to coremod as a better matching name. Updated the old 1.7.10 code using reflection to drop it where forge or vanilla now exposes that functionality directly.
125 lines
No EOL
3.4 KiB
Groovy
125 lines
No EOL
3.4 KiB
Groovy
/*
|
|
* 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 <http://www.gnu.org/licenses/lgpl>.
|
|
*/
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
mavenCentral()
|
|
maven {
|
|
name = "forge"
|
|
url = "http://files.minecraftforge.net/maven"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
|
}
|
|
}
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
mavenCentral()
|
|
}
|
|
|
|
apply from: 'gradle/scripts/dependencies.gradle'
|
|
apply from: 'gradle/scripts/artifacts.gradle'
|
|
apply from: 'gradle/scripts/optional.gradle'
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
version = aeversion + "-" + aechannel + "-" + aebuild
|
|
group = aegroup
|
|
archivesBaseName = aebasename
|
|
|
|
// Add Coremod Manifest
|
|
jar {
|
|
manifest {
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
|
attributes 'FMLAT': 'appeng_at.cfg'
|
|
}
|
|
|
|
from sourceSets.api.output
|
|
dependsOn apiClasses
|
|
|
|
// specify which files are really included, can control which APIs should be in
|
|
include "appeng/**"
|
|
include "assets/**"
|
|
include "mcmod.info"
|
|
include "pack.mcmeta"
|
|
include "META-INF/appeng_at.cfg"
|
|
}
|
|
|
|
minecraft {
|
|
coreMod = "appeng.coremod.AppEngCore"
|
|
|
|
version = minecraft_version + "-" + forge_version
|
|
|
|
replaceIn "AEConfig.java"
|
|
replaceIn "package-info.java"
|
|
|
|
replace "@version@", project.version
|
|
replace "@aeversion@", aeversion
|
|
replace "@aechannel@", aechannel
|
|
replace "@aebuild@", aebuild
|
|
|
|
// used when launching minecraft in dev env
|
|
runDir = "run"
|
|
mappings = mcp_mappings
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
api
|
|
|
|
// This source set will contain third party API code that we need to compile, but which is not shipped with the jar
|
|
thirdparty {
|
|
// Third Party APIs often need access to Minecraft classes (i.e. EnumFacing), so set this up here
|
|
compileClasspath += configurations.forgeGradleMc + configurations.forgeGradleMcDeps
|
|
}
|
|
|
|
main
|
|
|
|
}
|
|
|
|
dependencies {
|
|
compile sourceSets.thirdparty.output
|
|
}
|
|
|
|
processResources
|
|
{
|
|
// this will ensure that this task is redone when the versions change.
|
|
inputs.property "version", project.version
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'mcmod.info'
|
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
|
}
|
|
|
|
// copy everything else, thats not the mcmod.info
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'mcmod.info'
|
|
}
|
|
|
|
// move access transformer to META-INF
|
|
rename '(.+_at.cfg)', 'META-INF/$1'
|
|
} |