2019-06-21 16:55:57 +00:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
2019-10-21 15:08:57 +00:00
|
|
|
kotlin("jvm") version "1.3.50"
|
2019-06-21 16:55:57 +00:00
|
|
|
idea
|
2019-10-21 15:08:57 +00:00
|
|
|
id("fabric-loom") version "0.2.5-SNAPSHOT"
|
2019-06-21 16:55:57 +00:00
|
|
|
id("com.github.johnrengelman.shadow") version "4.0.4"
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
|
|
|
base {
|
|
|
|
archivesBaseName = "ASMR"
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "net.shadowfacts"
|
|
|
|
version = "0.1.0"
|
|
|
|
|
2019-08-08 19:41:40 +00:00
|
|
|
val minecraftVersion = "1.14.4"
|
|
|
|
val yarnMappings = "1.14.4+build.9"
|
2019-10-21 15:08:57 +00:00
|
|
|
val loaderVersion = "0.6.3+build.167"
|
|
|
|
val fabricVersion = "0.4.0+build.240-1.14"
|
|
|
|
val fabricKotlinVersion = "1.3.50+build.3"
|
2019-06-21 16:55:57 +00:00
|
|
|
val junitVersion = "5.4.0"
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven(url = "http://maven.fabricmc.net/") {
|
|
|
|
name = "Fabric"
|
|
|
|
}
|
2019-10-21 15:08:57 +00:00
|
|
|
maven(url = "https://kotlin.bintray.com/kotlinx")
|
2019-06-21 16:55:57 +00:00
|
|
|
jcenter()
|
|
|
|
mavenLocal()
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.api.get().extendsFrom(configurations.shadow.get())
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft(group = "com.mojang", name = "minecraft", version = minecraftVersion)
|
|
|
|
|
|
|
|
mappings(group = "net.fabricmc", name = "yarn", version = yarnMappings)
|
|
|
|
|
2019-10-21 15:08:57 +00:00
|
|
|
modImplementation(group = "net.fabricmc", name = "fabric-loader", version = loaderVersion)
|
|
|
|
modImplementation(group = "net.fabricmc.fabric-api", name = "fabric-api", version = fabricVersion)
|
2019-06-21 16:55:57 +00:00
|
|
|
|
2019-10-21 15:08:57 +00:00
|
|
|
modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = fabricKotlinVersion)
|
|
|
|
// compileOnly(group = "net.fabricmc", name = "fabric-language-kotlin", version = fabricKotlinVersion)
|
2019-06-21 16:55:57 +00:00
|
|
|
|
|
|
|
// compileOnly(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version = "1.3.21")
|
|
|
|
// compileOnly(group = "org.jetbrains.kotlin", name = "kotlin-reflect", version = "1.3.21")
|
|
|
|
|
|
|
|
shadow(project(":kiwi-java"))
|
|
|
|
|
|
|
|
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = junitVersion)
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.getByName<ProcessResources>("processResources") {
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
|
|
expand(
|
|
|
|
mutableMapOf(
|
|
|
|
"modid" to "ASMR",
|
|
|
|
"version" to project.version
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile>().configureEach {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<Test>() {
|
|
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
|
|
events("passed", "skipped", "failed")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val shadowJar by tasks.getting(ShadowJar::class) {
|
|
|
|
classifier = ""
|
|
|
|
configurations = listOf(project.configurations.shadow.get())
|
|
|
|
exclude("META-INF")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.getByName("build") {
|
|
|
|
dependsOn(shadowJar)
|
|
|
|
}
|