-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
115 lines (96 loc) · 3.58 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
PluginVersion.updateVersion()
version = PluginVersion.version
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "com.github.jengelman.gradle.plugins:shadow:$shadow_version"
}
}
apply plugin: "com.github.johnrengelman.shadow"
allprojects {
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
apply plugin: "kotlinx-serialization"
repositories {
mavenCentral()
maven { url "https://repo.codemc.org/repository/maven-public" }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:$kotlinx_serialization_version"
implementation "com.google.dagger:dagger:$dagger_version"
implementation "javax.inject:javax.inject:$javax_inject_version"
implementation "net.benwoodworth.localeconfig:localeconfig-api:$localeconfig_version"
implementation "org.bstats:bstats-bukkit-lite:$bstats_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek_version"
testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek_version"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
test {
useJUnitPlatform {
includeEngines 'spek2'
}
}
compileKotlin {
kotlinOptions {
jvmTarget = java_version
freeCompilerArgs = ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = java_version
freeCompilerArgs = ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
kapt {
correctErrorTypes = true
includeCompileClasspath = false
}
}
dependencies {
implementation project(':fastcraft-core')
implementation project(':fastcraft-bukkit')
}
jar {
enabled = false
dependsOn shadowJar
}
shadowJar {
archiveClassifier.set(null)
archiveVersion.set(archiveVersion.get().replace('+', '-'))
dependencies {
subprojects.each {
include dependency(it)
}
include dependency("org.jetbrains.kotlin:kotlin-stdlib")
include dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk7")
include dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
include dependency("org.jetbrains.kotlinx:kotlinx-serialization-core-jvm")
include dependency("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm")
include dependency("com.google.dagger:dagger")
include dependency("javax.inject:javax.inject")
include dependency("net.benwoodworth.localeconfig:localeconfig-api")
include dependency("org.bstats:bstats-bukkit-lite")
}
def libPackage = "net.benwoodworth.fastcraft.lib"
relocate("kotlin", "${libPackage}.kotlin")
relocate("kotlinx", "${libPackage}.kotlinx")
relocate("dagger", "${libPackage}.dagger")
relocate("javax.inject", "${libPackage}.javax.inject")
relocate("net.benwoodworth.localeconfig", "${libPackage}.localeconfig")
relocate("org.bstats", "${libPackage}.bstats")
minimize {
subprojects.each {
exclude dependency(it)
}
}
}