-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (51 loc) · 1.67 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = "me.axd1x8a"
version = project.property("version")
configurations {
shade
}
repositories {
mavenCentral()
maven { url = "https://jitpack.io" }
maven { url = "https://oss.sonatype.org/content/groups/public/" }
maven { url = "https://repo.papermc.io/repository/maven-public/" }
}
dependencies {
shade implementation("com.github.pengrad:java-telegram-bot-api:${project.java_telegram_bot_api_version}")
shade implementation("com.electronwill.night-config:toml:${project.night_config_version}")
compileOnly "com.github.unilock:yeplib:${project.yeplib_version}"
compileOnly "com.velocitypowered:velocity-api:${project.velocity_api_version}"
annotationProcessor "com.velocitypowered:velocity-api:${project.velocity_api_version}"
}
sourceSets {
main {
resources {
srcDirs = ["src/main/resources"]
}
java {
exclude "me/axd1x8a/velocitytelegrambridge/VelocityTelegramBridge.java"
}
}
}
task generateSources(type: Copy) {
from "src/main/java/me/axd1x8a/velocitytelegrambridge/VelocityTelegramBridge.java"
into "$buildDir/generated-src"
filter(ReplaceTokens, tokens:[version: project.version])
println "Generating sources..."
println "Version: ${project.version}"
}
compileJava {
source "$buildDir/generated-src"
dependsOn generateSources
}
shadowJar {
setArchiveClassifier(null)
setConfigurations([project.configurations.shade])
}
build {
dependsOn shadowJar
}