This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
80 lines (67 loc) · 2.13 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
buildscript {
ext.kotlin_version = "$kotlin_version"
}
plugins {
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
}
group 'org.kamiblue'
version "$bot_kt_version"
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://libraries.minecraft.net' }
}
dependencies {
implementation "com.google.code.gson:gson:$gson_version"
implementation "com.github.ronmamo:reflections:$reflections_version"
implementation "com.github.Tea-Ayataka:Kordis:$kordis_version"
implementation "com.neovisionaries:nv-websocket-client:$nv_websocket_version"
implementation "io.ktor:ktor-client-okhttp:$ktor_version"
implementation "io.ktor:ktor-client-json:$ktor_version"
implementation "io.ktor:ktor-client-gson:$ktor_version"
implementation "org.apache.logging.log4j:log4j-api:$log4j_version"
implementation "org.apache.logging.log4j:log4j-core:$log4j_version"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
}
sourceSets.main.java {
srcDirs += 'src/main/cape-api'
srcDirs += 'src/main/command'
srcDirs += 'src/main/commons'
srcDirs += 'src/main/event'
srcDirs += 'src/main/github-discussion-api'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task apiJar(type: Jar) {
group 'build'
description 'Assemble API library archive'
archiveClassifier.set('api')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.output
}
task sourceJar(type: Jar) {
group 'build'
description 'Assemble API library source archive'
archiveClassifier.set('api-sources')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.allSource
}
jar {
manifest {
attributes 'Main-Class': 'org.kamiblue.botkt.Main'
}
// copy deps to jar
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
task buildApi {
group 'build'
dependsOn apiJar
dependsOn sourceJar
description 'Assemble API library archives'
}