2016-08-06 14:28:05 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
name "forge"
|
|
|
|
url "http://files.minecraftforge.net/maven/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT"
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins {
|
2016-08-06 14:52:01 +00:00
|
|
|
id "maven"
|
2016-08-06 14:28:05 +00:00
|
|
|
id "com.github.johnrengelman.shadow" version "1.2.3"
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: "net.minecraftforge.gradle.forge"
|
|
|
|
apply plugin: "kotlin"
|
|
|
|
|
2016-08-06 14:46:57 +00:00
|
|
|
version = mod_version
|
2016-08-06 14:28:05 +00:00
|
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
version = mc_version + "-" + forge_version
|
|
|
|
runDir = "run"
|
|
|
|
|
|
|
|
mappings = mcp_mappings
|
|
|
|
|
|
|
|
replaceIn "Reference.kt"
|
|
|
|
replaceIn "Reference.kt"
|
|
|
|
replace "@VERSION@", mod_version
|
|
|
|
|
|
|
|
useDepAts = true
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
inputs.property "version", project.version
|
|
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
|
|
|
|
from (sourceSets.main.resources.srcDirs) {
|
|
|
|
include "mcmod.info"
|
|
|
|
expand "version": project.version, "mcversion": mc_version
|
|
|
|
}
|
|
|
|
from (sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude "mcmod.info"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2017-04-29 16:05:56 +00:00
|
|
|
jcenter()
|
2016-08-06 14:28:05 +00:00
|
|
|
maven {
|
|
|
|
name "shadowfacts"
|
|
|
|
url "http://mvn.rx14.co.uk/shadowfacts/"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
url "http://dvs1.progwml6.com/files/maven"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
url "http://maven.epoxide.xyz"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
|
2017-06-11 20:15:54 +00:00
|
|
|
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jre8", version: kotlin_version
|
2016-08-06 14:28:05 +00:00
|
|
|
compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version
|
|
|
|
compile group: "org.jetbrains.kotlin", name: "kotlin-runtime", version: kotlin_version
|
2017-04-29 16:05:56 +00:00
|
|
|
compile group: "org.jetbrains", name: "annotations", version: annotations_version
|
|
|
|
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-core", version: coroutines_version
|
|
|
|
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version
|
2016-08-06 14:28:05 +00:00
|
|
|
}
|
|
|
|
|
2017-02-16 23:22:08 +00:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
|
|
|
"FMLCorePluginContainsFMLMod": "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-06 14:28:05 +00:00
|
|
|
shadowJar {
|
|
|
|
classifier = ""
|
|
|
|
dependencies {
|
|
|
|
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"))
|
|
|
|
include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
|
|
|
|
include(dependency("org.jetbrains.kotlin:kotlin-runtime:${kotlin_version}"))
|
2017-04-29 16:05:56 +00:00
|
|
|
include(dependency("org.jetbrains:annotations:${annotations_version}"))
|
|
|
|
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"))
|
|
|
|
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}"))
|
2016-08-06 14:28:05 +00:00
|
|
|
}
|
2017-02-16 23:22:08 +00:00
|
|
|
manifest {
|
|
|
|
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
|
|
|
"FMLCorePluginContainsFMLMod": "true"
|
|
|
|
}
|
2016-08-06 14:28:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.build.dependsOn shadowJar
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives shadowJar
|
2016-09-22 22:13:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
reobf {
|
|
|
|
shadowJar {
|
|
|
|
mappingType = "SEARGE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tasks.reobfShadowJar.mustRunAfter shadowJar
|
|
|
|
tasks.build.dependsOn reobfShadowJar
|