forked from Tutorialwork/ProfessionalBans-Reloaded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (96 loc) · 2.87 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
114
115
116
117
118
/*
* © Copyright - Lars Artmann aka. LartyHD 2019.
*/
buildscript {
ext {
kotlinVersion = '1.3.21'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'idea'
group = pluginGroup
version = pluginVersion
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven { url = "http://maven.elmakers.com/repository/" }
maven { url = ("https://jitpack.io") }
maven { url = "https://repo.velocitypowered.com/snapshots/" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots" }
}
configurations {
// configuration that holds jars to include in the jar
compile.extendsFrom jarLibs
}
dependencies {
compile fileTree(libsDirName)
/*compileOnly 'net.md-5:bungeecord-api:1.14-SNAPSHOT'*/
compile "mysql:mysql-connector-java:5.1.46"
jarLibs 'org.jetbrains.exposed:exposed:0.17.4'
compileOnly 'com.velocitypowered:velocity-api:1.0.0-SNAPSHOT'
// compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
jarLibs "org.jetbrains.kotlin:kotlin-stdlib"
jarLibs "org.jetbrains.kotlin:kotlin-reflect"
jarLibs "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1"
testCompileOnly "org.jetbrains.kotlin:kotlin-test"
testCompileOnly "org.jetbrains.kotlin:kotlin-test-junit5"
testCompileOnly "org.mockito:mockito-all:2.0.2-beta"
testCompileOnly "org.junit.jupiter:junit-jupiter-api:5.3.1"
}
jar {
from {
configurations.jarLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
}
wrapper {
gradleVersion = '5.2'
doFirst {
def tree = fileTree('src/main').include('**/*.kt')
tree.each { File file ->
def lines = file.readLines()
def list = []
lines.each { String line ->
list += line.replace("import de.tutorialwork.XX", "import de.tutorialwork.global.")
}
file.write(list.join("\n"), "UTF-8")
}
}
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
suppressWarnings = true
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
suppressWarnings = true
}
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}