-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (73 loc) · 2.15 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
}
apply from: 'gradle/properties.gradle'
group = info.group
version = "${info.version}-${version_spigot}"
sourceCompatibility = 18
targetCompatibility = 18
test {
useJUnitPlatform()
}
repositories {
mavenLocal()
mavenCentral()
maven { url = 'https://jitpack.io' }
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly deps.spigot
compileOnly deps.log4j
compileOnly deps.snakeyaml
implementation deps.kotlin
implementation deps.koin.core
implementation 'org.xerial:sqlite-jdbc:3.40.0.0'
implementation "org.jetbrains.exposed:exposed-core:$version_exposed"
implementation "org.jetbrains.exposed:exposed-dao:$version_exposed"
implementation "org.jetbrains.exposed:exposed-jdbc:$version_exposed"
testImplementation deps.spigot
testImplementation 'org.jetbrains.kotlin:kotlin-reflect'
testImplementation "org.junit.jupiter:junit-jupiter:5.9.1"
testImplementation 'org.mockito:mockito-core:4.10.0'
testImplementation 'org.mockito:mockito-inline:4.10.0'
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.1.0'
testImplementation deps.koin.test
testImplementation deps.koin.test_junit5
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [
'version': version.toString(),
'api-version': version_spigot_api.toString(),
]
}
}
jar {
exclude "META-INF/versions/9/module-info.class"
from configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
task copyJarToServer(type: Copy) {
from jar
into "server/plugins"
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
assemble.dependsOn copyJarToServer