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