spigot-tg-bridge/build.gradle
2020-07-19 19:34:12 +03:00

68 lines
1.6 KiB
Groovy

import org.yaml.snakeyaml.Yaml
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.yaml', name: 'snakeyaml', version: '1.26'
}
}
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.60'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
group 'org.kraftwerk28'
def pluginConfigFile = new File("src/main/resources/plugin.yml").newInputStream()
def cfg = (Map<String, Object>)new Yaml().load(pluginConfigFile)
version cfg.get("version")
repositories {
maven {
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots"
}
maven {
url "https://jitpack.io"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
mavenCentral()
jcenter()
}
def plugDir = "MinecraftServers/spigot_1.15.2/plugins/"
def homeDir = System.properties['user.home']
task cpArtifacts(type: Copy) {
from shadowJar
into "$homeDir/$plugDir"
}
shadowJar {
archiveClassifier = null
}
shadowJar.finalizedBy cpArtifacts
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation group: 'junit', name: 'junit', version: '4.12'
compileOnly "org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT"
implementation 'com.vdurmont:emoji-java:5.1.1'
def tgBotVer = '5.0.0'
implementation "io.github.kotlin-telegram-bot.kotlin-telegram-bot:telegram:$tgBotVer"
// def ktorVersion = '1.3.2'
// implementation "io.ktor:ktor-server-core:$ktorVersion"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}