-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
119 lines (102 loc) · 3.29 KB
/
build.gradle
File metadata and controls
119 lines (102 loc) · 3.29 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
plugins {
id 'java'
id 'io.freefair.lombok' version '8.10.2'
id 'com.gradleup.shadow' version '8.3.6'
id 'maven-publish'
}
group = project.properties['group'] ?: 'gg.drak'
version = project.properties['version'] ?: '1.0.0'
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11
repositories {
// Maven Defaults
mavenCentral()
mavenLocal()
// Streamline Essentials repository
maven {
name = "streamline-essentials"
url = "https://repo.codemc.org/repository/streamline-essentials/"
}
// JitPack
maven { url 'https://jitpack.io' }
}
configurations {
implementation {
exclude group: 'org.slf4j', module: 'slf4j-api'
exclude group: 'org.apache.logging.log4j'
}
shadow {
exclude group: 'org.slf4j', module: 'slf4j-api'
exclude group: 'org.apache.logging.log4j'
}
}
dependencies {
// Databases
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'org.xerial:sqlite-jdbc:3.46.1.0'
implementation 'com.zaxxer:HikariCP:5.1.0'
// Exp4j
implementation 'net.objecthunter:exp4j:0.4.8'
// RE2J
implementation 'com.google.re2j:re2j:1.7'
// JetBrains Annotations
implementation 'org.jetbrains:annotations:24.0.1'
// SimplixStorage
implementation 'gg.drak:SimplixStorage:3.4.0'
}
shadowJar {
Map<String, String> relocations = [
'de.leonhard': 'gg.drak.thebase.lib.leonhard',
'com.mysql': 'gg.drak.thebase.lib.mysql',
'com.zaxxer.hikari': 'gg.drak.thebase.lib.hikari',
'net.objecthunter.exp4j': 'gg.drak.thebase.lib.exp4j',
'com.google.re2j': 'gg.drak.thebase.lib.re2j',
'com.google.gson': 'gg.drak.thebase.lib.google.gson',
'com.google.guava': 'gg.drak.thebase.lib.google.guava',
'org.sqlite': 'gg.drak.thebase.lib.sqlite',
'org.xerial': 'gg.drak.thebase.lib.xerial',
'org.apache.commons': 'gg.drak.thebase.lib.apache.commons',
'org.yaml': 'gg.drak.thebase.lib.yaml',
'org.bstats': 'gg.drak.thebase.lib.bstats'
]
relocations.each { src, dest -> relocate src, dest }
exclude 'com/google/common/**'
exclude 'org/apache/logging/log4j/**'
exclude 'org/slf4j/**'
exclude 'META-INF/**'
exclude '**/LICENSE'
exclude '**/README.md'
exclude '**/docs/**'
archiveFileName = "${project.name}-${project.version}.jar"
}
java {
withSourcesJar()
withJavadocJar()
}
wrapper {
gradleVersion = '8.9'
distributionType = Wrapper.DistributionType.BIN
}
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId "$project.name"
version project.version
from components.java
}
}
repositories {
maven {
url = "https://repo.codemc.io/repository/streamline-essentials/"
def mavenUsername = System.getenv("JENKINS_NEXUS_USERNAME")
def mavenPassword = System.getenv("JENKINS_NEXUS_PASSWORD")
if (mavenUsername != null && mavenPassword != null) {
credentials {
username = mavenUsername
password = mavenPassword
}
}
}
}
}