-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (80 loc) · 2.92 KB
/
build.gradle
File metadata and controls
92 lines (80 loc) · 2.92 KB
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'com.github.johnrengelman.shadow' version '4.0.2'
}
wrapper {
gradleVersion = "6.5"
setDistributionType(Wrapper.DistributionType.ALL)
}
group 'com.github.james9909'
version '1.16.5-0.1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Disable the regular jar task, since we only want the shadow jar
jar.enabled = false
tasks.build.dependsOn tasks.shadowJar
shadowJar {
minimize()
relocate("com.github.michaelbull.result", "com.github.james9909.warplus.shaded.result")
relocate("com.zaxxer.hikari", "com.github.james9909.warplus.shaded.hikari")
relocate("com.mysql", "com.github.james9909.warplus.shaded.mysql")
relocate("kotlin", "com.github.james9909.warplus.shaded.kotlin")
exclude 'META-INF/**'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
mavenCentral()
jcenter()
maven { url "https://papermc.io/repo/repository/maven-public/" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url = "https://jitpack.io" }
maven { url = uri("https://mvn.intellectualsites.com/content/repositories/releases/") } // FAWE
flatDir {
dirs "lib"
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "com.michael-bull.kotlin-result:kotlin-result:1.1.14"
compile "org.xerial:sqlite-jdbc:3.7.2"
compile "mysql:mysql-connector-java:5.1.13"
compile "com.zaxxer:HikariCP:3.4.5"
compileOnly ":MagicSpells-4.0-Beta-7"
compileOnly "com.intellectualsites.fawe:FAWE-Bukkit:1.16-637"
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly "com.github.MilkBowl:VaultAPI:1.7"
testCompile "org.junit.jupiter:junit-jupiter:5.4.2"
testCompile "com.github.seeseemelk:MockBukkit-v1.16:0.5.0"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
outputs.upToDateWhen {false}
useJUnitPlatform()
testLogging {
afterTest { desc, result ->
logger.quiet "${desc.className} > ${desc.name}: ${result.resultType}"
}
// Taken from https://stackoverflow.com/a/36130467
afterSuite { desc, result ->
if (!desc.parent) {
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}