importjava.net.URIimportorg.jetbrains.kotlin.gradle.tasks.KotlinCompileplugins{// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
kotlin("jvm")version"1.6.10"// Apply the application plugin to add support for building a CLI application in Java.
application}repositories{// Use Maven Central for resolving dependencies.
mavenCentral()maven{url=URI("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")}}group="グループ名"version="1.0-SNAPSHOT"java.sourceCompatibility=JavaVersion.VERSION_17valmcVersion="1.18.1"dependencies{// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))// Kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect")implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")// Spigot API
compileOnly("org.spigotmc:spigot-api:${mcVersion}-R0.1-SNAPSHOT")}application{// Define the main class for the application.
mainClass.set("メインクラスを指定")}tasks.withType<KotlinCompile>{kotlinOptions{freeCompilerArgs=listOf("-Xjsr305=strict")jvmTarget="17"}}tasks.withType<Test>{useJUnitPlatform()}