MineLittlePony/build.gradle
Matthew Messinger f0509fbb28 Multi-project
2015-11-17 00:19:58 -05:00

92 lines
2.1 KiB
Groovy

plugins {
id 'net.minecraftforge.gradle.tweaker-client' version '2.0.2'
}
ext.voxellib = project ':voxellib'
ext.revision = 186
archivesBaseName = "MineLittlePony"
group = 'com.brohoof.minelp'
version = '1.8'
minecraft {
version = "1.8"
mappings = 'snapshot_20151027'
runDir = 'run'
tweakClass = 'com.mumfrey.liteloader.launch.LiteLoaderTweaker'
replace '@VERSION@',project.version
}
project('common') {
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceSets.main {
compileClasspath += rootProject.configurations.forgeGradleMc
}
eclipse.classpath.file.withXml {
def path = "$gradle.gradleUserHomeDir/caches/minecraft/net/minecraft/minecraft/$minecraft.version/${minecraft.mappings.replace('_','/')}/minecraftSrc-$minecraft.version"
it.asNode().appendNode('classpathentry',[
kind: "lib",
path: "${path}.jar",
sourcepath:"$path-sources.jar"
])
}
}
project('forge') {
apply plugin: 'net.minecraftforge.gradle.forge'
minecraft {
version = '1.8-11.14.3.1543'
mappings = rootProject.minecraft.mappings
runDir = '../run'
replace '@VERSION@',project.version
}
dependencies {
provided project(':common')
}
}
processResources {
def props = [
version: version,
mcversion: minecraft.version,
revision: revision
]
inputs.properties props
from(sourceSets.main.resources.srcDirs) {
include 'litemod.json'
expand props
}
from(sourceSets.main.resources.srcDirs) {
exclude 'litemod.json'
}
}
repositories.flatDir {
dir 'liteloader'
}
dependencies {
compile project('common')
deobfProvided 'com.mumfrey:liteloader:1.8-SNAPSHOT:srgnames'
provided voxellib
}
jar {
manifest.attributes.remove 'TweakClass'
extension 'litemod'
from project('common').sourceSets.main.output
from project('forge').sourceSets.main.output
}
task standaloneJar(type: Jar, dependsOn: [{voxellib.build}, reobfJar]) {
extension 'litemod'
from zipTree(jar.archivePath)
// voxellib
from {voxellib.jar.archivePath}
classifier 'standalone'
}
artifacts {
archives standaloneJar
}