import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { kotlin("jvm") version "1.3.50" idea id("fabric-loom") version "0.2.5-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.6.3+build.167" val fabricVersion = "0.4.0+build.240-1.14" val fabricKotlinVersion = "1.3.50+build.3" val junitVersion = "5.4.0" minecraft { } repositories { maven(url = "http://maven.fabricmc.net/") { name = "Fabric" } maven(url = "https://kotlin.bintray.com/kotlinx") 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) modImplementation(group = "net.fabricmc", name = "fabric-loader", version = loaderVersion) modImplementation(group = "net.fabricmc.fabric-api", name = "fabric-api", version = fabricVersion) modImplementation(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) }