forked from zachbr/Dis4IRC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (89 loc) · 2.7 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
id 'net.minecrell.licenser' version "0.4.1"
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
}
group 'io.zachbr'
version '1.2.1-SNAPSHOT'
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' }
maven { url 'https://repo.spongepowered.org/maven' }
mavenCentral()
jcenter()
}
jar {
manifest.attributes(
'Main-Class': "io.zachbr.dis4irc.Dis4IRCKt",
)
}
jar.enabled = false
build.dependsOn(shadowJar)
import org.apache.tools.ant.filters.ReplaceTokens
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [
'project-name' : rootProject.name,
'project-version' : version,
'project-git-hash' : getGitHash(),
'project-source-repo': 'https://github.com/zachbr/Dis4IRC'
]
}
}
artifacts {
shadowJar
}
shadowJar {
classifier = null
preserveFileTimestamps = false
reproducibleFileOrder = true
from "LICENSE.md"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "club.minnced:discord-webhooks:0.3.1"
implementation 'org.javacord:javacord:3.1.1'
implementation "org.kitteh.irc:client-lib:7.3.0"
implementation "club.minnced:discord-webhooks:0.5.0"
implementation 'org.json:json:20180813'
implementation "org.spongepowered:configurate-hocon:3.7.1"
implementation "com.atlassian.commonmark:commonmark:0.15.2"
implementation "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:0.15.2"
implementation "org.slf4j:slf4j-api:1.7.30"
implementation "org.apache.logging.log4j:log4j-core:2.13.2"
runtime "org.apache.logging.log4j:log4j-slf4j-impl:2.13.2"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:1.4.10"
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}
dependencyManagement {
imports {
mavenBom 'org.apache.logging.log4j:log4j-bom:2.13.2'
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
// updateLicenses | checkLicenses
license {
header = project.file('HEADER.txt')
ext {
name = rootProject.name
year = "2018-2020"
}
}
test {
testLogging.showStandardStreams = true
useJUnitPlatform()
}