-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
113 lines (93 loc) · 2.5 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
plugins {
id("java")
id("java-library")
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.diffplug.spotless") version "6.25.0"
}
group "net.fabricmc"
version "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
allprojects {
apply plugin: "java"
apply plugin: "java-library"
apply plugin: "com.diffplug.spotless"
repositories {
mavenCentral()
maven {
name = "Sonatype Snapshots"
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
name = "Fabric"
url = "https://maven.fabricmc.net"
}
}
// Common dependencies
dependencies {
compileOnly("org.jetbrains:annotations:20.1.0")
implementation("org.javacord:javacord:$javacordVersion")
// tag parser artifact does not need a full db
if (project != rootProject.project(":tag-parser")) {
// Database
implementation("com.zaxxer:HikariCP:3.4.5")
implementation("org.xerial:sqlite-jdbc:3.36.0.3")
}
// Logging
implementation("org.apache.logging.log4j:log4j-core:2.17.1")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.1")
// Json Serialization
implementation("com.google.code.gson:gson:2.8.6")
implementation("it.unimi.dsi:fastutil-core:8.5.4");
// TODO: Do we want this so we can :irritater: instead of raw id for custom emotes?
// https://github.com/vdurmont/emoji-java
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator(", ")
}
// Spotless tries to be smart by ignoring package-info files, however license headers are allowed there
// TODO: Replicate on module-info if needed?
// FIXME: Currently broken
// format("package-info.java") {
// target "**/package-info.java"
//
// // Only update license headers when changes have occurred
// ratchetFrom("origin/master")
// // Regex is `/**` or `package`
// licenseHeaderFile(rootProject.file("HEADER"), "/\\*\\*|package").yearSeparator(", ")
// }
}
java {
modularity.inferModulePath = true
}
tasks.withType(JavaCompile).configureEach {
options.release = 16
}
}
// Main bot module
application {
mainClass = "net.fabricmc.discord.bot.Main"
executableDir = "run"
}
// Setup dependencies for big boi jar
dependencies {
afterEvaluate {
subprojects.each {
implementation(it)
}
}
}
// Propagate core dependency to subprojects
subprojects {
if (project != project(":core")) {
dependencies {
implementation(rootProject.project(":core"))
}
}
}
java {
modularity.inferModulePath = true
}