-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (93 loc) · 3.39 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
* © Copyright - Lars Artmann aka. LartyHD 2019.
*/
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
ext {
kotlinVersion = '1.3.31'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${kotlinVersion}")
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlinx-serialization'
apply plugin: 'idea'
group = pluginGroup
version = pluginVersion
libsDirName = "libraries"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
jcenter()
google()
maven { url = ("http://nexus.hc.to/content/repositories/pub_releases/") }
maven { url = ("https://hub.spigotmc.org/nexus/content/groups/public/") }
maven { url = ("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = ("https://oss.sonatype.org/content/groups/public/") }
maven { url = ("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { url = ("http://repo.dmulloy2.net/content/groups/public/") }
maven { url = ("https://repo.velocitypowered.com/snapshots/") }
maven { url = ("http://repo.spongepowered.org/maven") }
maven { url = ("https://jitpack.io") }
// artifacts are published to this repository
maven { url "https://kotlin.bintray.com/kotlinx" }
}
configurations {
// configuration that holds jars to include in the jar
compile.extendsFrom jarLibs
}
dependencies {
compileOnly("com.github.AstrideUG.DarkBedrock:Darkness-Spigot:f923a17")
compileOnly("com.github.PlaceholderAPI:PlaceholderAPI:2.10.2") {
exclude(module: "bstats-bukkit")
exclude(module: "jsonmessage")
}
compileOnly "org.jetbrains.kotlin:kotlin-stdlib"
compileOnly "org.jetbrains.kotlin:kotlin-reflect"
compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1"
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0"
compileOnly("org.spigotmc:spigot-api:${versions_spigot}")
testCompile("org.spigotmc:spigot-api:${versions_spigot}")
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
testCompile group: 'junit', name: 'junit', version: '4.13-beta-2'
// testCompileOnly "org.junit.jupiter:junit-jupiter-api:5.3.1"
testCompile "com.github.nhaarman:mockito-kotlin:2.1.0"
testCompile 'io.mockk:mockk:1.9'
}
jar {
from {
configurations.jarLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
}
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version, group: pluginGroup, name: rootProject.name, lowerName: rootProject.name.toLowerCase()]
}
}
wrapper {
gradleVersion = '5.2'
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict', '-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer']
jvmTarget = '1.8'
suppressWarnings = true
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict', '-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer']
jvmTarget = '1.8'
suppressWarnings = true
}
}