Forgelin/build.gradle

107 lines
2.9 KiB
Groovy
Raw Permalink Normal View History

2016-08-06 14:28:05 +00:00
buildscript {
repositories {
jcenter()
maven {
name "forge"
url "http://files.minecraftforge.net/maven/"
}
}
dependencies {
2017-06-29 20:39:47 +00:00
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
2016-08-06 14:28:05 +00:00
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: "kotlin"
2017-08-12 21:51:45 +00:00
apply plugin: "net.minecraftforge.gradle.forge"
2017-11-30 18:31:14 +00:00
apply from: "https://github.com/shadowfacts/maven/raw/master/maven.gradle"
2016-08-06 14:28:05 +00:00
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 "Forgelin.kt"
2016-08-06 14:28:05 +00:00
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 {
jcenter()
2016-08-06 14:28:05 +00:00
}
dependencies {
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version
2018-06-09 19:29:04 +00:00
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", 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", 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
}
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-stdlib-jdk7:${kotlin_version}"))
include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"))
2016-08-06 14:28:05 +00:00
include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
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
}
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
}
reobf {
shadowJar {
mappingType = "SEARGE"
}
}
tasks.reobfShadowJar.mustRunAfter shadowJar
tasks.build.dependsOn reobfShadowJar
2017-06-29 20:39:47 +00:00
2017-11-30 18:31:14 +00:00