DimDoors/build.gradle
Robijnvogel dde38384fa Fixed #21
-Upped the forge and mappings versions in build.gradle
-Restructured Mod Name and Dependencies strings in DimDoors.java

-Instead of returning a null bounding box in
BlockDimensionalDoorTransient#getBoundingBox, for now, return an empty
bounding box.
2018-01-13 17:17:45 +01:00

98 lines
2.8 KiB
Groovy

buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id 'io.franzbecker.gradle-lombok' version '1.11'
id 'java'
}
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle.forge'
repositories {
maven { url "https://jitpack.io" }
}
// Version info
String baseversion = "3.0.0" // Set beta to 0 after changing this
int beta = 4 // Set this to 0 for a non-beta release
ext.mcversion = "1.12.2"
ext.forgeversion = "14.23.1.2589"
String mcpversion = "snapshot_20180113"
String suffix = ""
String shortSuffix = ""
if (beta != 0) {
suffix += "-beta$beta"
shortSuffix = suffix
if (System.getenv("TRAVIS_BUILD_NUMBER") != null && beta != 0) {
suffix += "+${System.getenv("TRAVIS_BUILD_NUMBER")}"
} else {
suffix += "+UNOFFICIAL"
}
}
version = ext.modversion = baseversion + suffix
group = "org.dimdev.dimdoors"
archivesBaseName = "dimdoors"
jar.archiveName = "dimdoors.jar" // Constant name for travis
sourceCompatibility = "1.8"
compileJava {
//options.compilerArgs += "-proc:only"
}
minecraft {
version = "$mcversion-$forgeversion"
runDir = "run"
mappings = mcpversion
replace '${version}', baseversion + shortSuffix
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
configurations {
embed
compile.extendsFrom(embed)
}
dependencies {
embed 'com.flowpowered:flow-math:1.0.3'
compile 'com.github.DimensionalDevelopment:AnnotatedNBT:-SNAPSHOT'
}
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
main = "org.dimdev.dimdoors.shared.tools.PocketSchematicGenerator"
//noinspection GroovyAssignabilityCheck (IntelliJ is wrong)
args "src/main/resources/assets/dimdoors/pockets/schematic"
}