Last active
October 14, 2019 07:58
-
-
Save mirror-kt/cfa06cb5cb592a7437f7dbbb91e357a2 to your computer and use it in GitHub Desktop.
Minecraft 1.14.4向け forge modのbuild.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minecraftforge.gradle.common.util.RunConfig | |
import net.minecraftforge.gradle.userdev.UserDevExtension | |
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
kotlin("jvm") version "1.3.50" | |
} | |
val modName: String by extra | |
val modVersion: String by extra | |
val mcVersion: String by extra | |
val mappingsMcVersion: String by extra | |
val forgeVersion: String by extra | |
val mcpVersion: String by extra | |
buildscript { | |
repositories { | |
jcenter() | |
maven("http://files.minecraftforge.net/maven") | |
} | |
dependencies { | |
classpath("net.minecraftforge.gradle:ForgeGradle:3.+") | |
} | |
} | |
apply(plugin = "net.minecraftforge.gradle") | |
version = modVersion | |
group = "com.github.kyou.today.mod.$modName" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
"minecraft"("net.minecraftforge:forge:$mcVersion-$forgeVersion") | |
implementation(kotlin("stdlib-jdk8")) | |
} | |
configure<UserDevExtension> { | |
version = "$mcVersion-$forgeVersion" | |
mappings("snapshot", "$mcpVersion-$mappingsMcVersion") | |
runs { | |
val runConfig = Action<RunConfig> { | |
properties(mapOf( | |
"forge.logging.markers" to "SCAN,REGISTRIES,REGISTRYDUMP", | |
"forge.logging.console.level" to "debug" | |
)) | |
workingDirectory = file("run").canonicalPath | |
} | |
create("client", runConfig) | |
} | |
} | |
configure<BasePluginConvention> { | |
archivesBaseName = "$modName-mc$mcVersion" | |
} | |
val compileKotlin: KotlinCompile by tasks | |
compileKotlin.kotlinOptions { | |
jvmTarget = "1.8" | |
} | |
val compileTestKotlin: KotlinCompile by tasks | |
compileTestKotlin.kotlinOptions { | |
jvmTarget = "1.8" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment