buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } maven { url = "https://maven.tterrag.com/" } maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1' classpath group: 'com.wynprice.cursemaven', name: 'CurseMaven', version: '2.1.5' } } plugins { id "com.github.johnrengelman.shadow" version "4.0.4" } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'kotlin' apply plugin: 'org.jetbrains.dokka' version = "1.3.1" group = 'thedarkcolour.kotlinforforge' archivesBaseName = 'kotlinforforge' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' tasks.build.dependsOn kotlinSourcesJar tasks.build.dependsOn shadowJar minecraft { mappings channel: 'snapshot', version: '20200213-mixed-1.15.2' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' } server { workingDirectory project.file('run/server') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' } data { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') } } } repositories { mavenCentral() maven { name = 'Yarn Mappings' url = 'https://maven.tterrag.com/' } maven { name = 'Kotlin Early Access' url = 'https://dl.bintray.com/kotlin/kotlin-eap' } maven { name = 'Dokka' url = 'https://dl.bintray.com/kotlin/dokka' } maven { name = "CurseForge" url = "https://minecraft.curseforge.com/api/maven/" } } dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.5' compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlin_version 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 } shadowJar { classifier = "obf" 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}") 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}") } } jar { manifest { attributes(["FMLModType": "LANGPROVIDER"]) attributes([ "Specification-Title": "Mod Language Provider", "Specification-Vendor": "Forge", "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"thedarkcolour", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ], "thedarkcolour/kotlinforforge/") } } compileKotlin { kotlinOptions { jvmTarget = '1.8' freeCompilerArgs = ["-Xexplicit-api=warning"] } } kotlinSourcesJar { from(sourceSets.main.kotlin.srcDirs) } dokka { outputFormat = 'html' outputDirectory = "$buildDir/dokka" configuration { reportUndocumented = true samples = ["$rootDir/src/test/kotlin/thedarkcolour/example/ExampleMod.kt".toString()] } }