DimDoors/build.gradle

86 lines
2.8 KiB
Groovy
Raw Normal View History

buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
2017-11-24 00:32:59 +01:00
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
2017-12-07 05:54:43 +01:00
plugins {
id 'io.franzbecker.gradle-lombok' version '1.11'
id 'java'
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup.
2017-12-29 05:46:29 +01:00
ext.modversion = "3.0.0-b2"
2017-11-24 00:32:59 +01:00
ext.mcversion = "1.12.2"
2017-12-03 12:43:44 +01:00
ext.forgeversion = "14.23.1.2555"
//spongeSchematicVersion = "1"
version = mcversion + "-" + modversion
2017-12-27 08:49:36 +01:00
group = "org.dimdev.dimdoors" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "dimdoors"
jar.archiveName = "dimdoors.jar" // Constant name for travis
sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
2017-12-29 05:46:29 +01:00
options.compilerArgs += [
//"-proc:only", // TODO: have generated code available for debugging
"-processor", "org.dimdev.ddutils.nbt.SavedToNBTProcessor,lombok.launch.AnnotationProcessorHider\$AnnotationProcessor"
]
}
minecraft {
2017-12-17 02:44:23 +01:00
version = "1.12.2-14.23.1.2555"
runDir = "run"
2017-12-24 01:06:56 +01:00
mappings = "snapshot_20171007"
replace '${version}', project.version
//replace '${spongeSchematicVersion}', spongeSchematicVersion
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
configurations {
2017-12-29 05:46:29 +01:00
embed
compile.extendsFrom(embed)
}
dependencies {
embed 'com.flowpowered:flow-math:1.0.3'
2017-12-29 05:46:29 +01:00
compile project(':AnnotatedNBT')
}
jar {
from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
}
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'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
task generatePocketSchematics(dependsOn: jar, type: JavaExec, group: "dimdoors") {
classpath = files('build/libs/dimdoors.jar')
classpath += sourceSets.main.runtimeClasspath
2017-12-27 08:49:36 +01:00
main = "org.dimdev.dimdoors.shared.tools.PocketSchematicGenerator"
2017-12-22 02:29:37 +01:00
//noinspection GroovyAssignabilityCheck (IntelliJ is wrong)
args "src/main/resources/assets/dimdoors/pockets/schematic"
}