Skip to content

Instantly share code, notes, and snippets.

@dashaw92
Created March 23, 2019 07:02
Show Gist options
  • Save dashaw92/0f9ed45756beccb7cbdc9f6e7c2a8364 to your computer and use it in GitHub Desktop.
Save dashaw92/0f9ed45756beccb7cbdc9f6e7c2a8364 to your computer and use it in GitHub Desktop.
Skeleton Kotlin/Spigot build.gradle
plugins {
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.3.0'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
group 'me.daniel'
version '1.0'
//vars (CHANGE ME)
def bukkitVer = "1.13.2-R0.1-SNAPSHOT"
def kotlinVer = "1.3.0"
repositories {
mavenCentral()
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "org.spigotmc:spigot-api:$bukkitVer"
}
jar {
from {
String[] include = [
"kotlin-runtime-${kotlinVer}.jar",
"kotlin-stdlib-${kotlinVer}.jar"
]
configurations.compile
.findAll { include.contains(it.name) }
.collect { it.isDirectory() ? it : zipTree(it) }
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
noStdlib = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment