import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { kotlin("jvm") version "1.3.40" idea id("fabric-loom") version "0.2.3-SNAPSHOT" 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" val minecraftVersion = "1.14.4" val yarnMappings = "1.14.4+build.9" val loaderVersion = "0.4.8+build.159" val fabricVersion = "0.3.1+build.208" val fabricKotlinVersion = "1.3.40+build.1" val junitVersion = "5.4.0" minecraft { } repositories { maven(url = "http://maven.fabricmc.net/") { name = "Fabric" } 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) modCompile(group = "net.fabricmc", name = "fabric-loader", version = loaderVersion) modCompile(group = "net.fabricmc.fabric-api", name = "fabric-api", version = fabricVersion) modCompile(group = "net.fabricmc", name = "fabric-language-kotlin", version = fabricKotlinVersion) compileOnly(group = "net.fabricmc", name = "fabric-language-kotlin", version = fabricKotlinVersion) // 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") { filesMatching("fabric.mod.json") { expand( mutableMapOf( "modid" to "ASMR", "version" to project.version ) ) } } tasks.withType().configureEach { kotlinOptions { jvmTarget = "1.8" } } tasks.withType() { 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) }