This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
76 lines (65 loc) · 2.02 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
}
group 'fr.skylyxx.skdynmap'
version '1.2.2'
def mcVersion = '1.16'
def subVersion = '.5'
repositories {
mavenCentral()
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://jitpack.io' }
maven { url = 'https://repo.destroystokyo.com/repository/maven-public/' }
}
dependencies {
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: mcVersion + subVersion + '-R0.1-SNAPSHOT'
compileOnly group: 'com.github.SkriptLang', name: 'Skript', version: '2.6-alpha1', {
exclude module: 'paper-api'
exclude module: 'Vault'
exclude module: 'worldguard'
exclude module: 'worldguard-legacy'
}
compileOnly group: 'com.github.webbukkit.dynmap', name: 'DynmapCore', version: '3.1-beta-7', {
exclude module: 'javax.servlet-api'
}
compileOnly group: 'org.jetbrains', name: 'annotations', version: '20.1.0'
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
jar {
archiveName("SkDynmap.jar")
}
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
} as Object
task githubRessources(type: ProcessResources) {
from("src/main/resources", {
include("**")
def lastCommit = getGitHash()
def ver = project.version + "-Github-" + lastCommit
filter ReplaceTokens, tokens: [
'version': ver,
'apiVersion': mcVersion,
]
})
into("build/resources/main")
}
task githubRelease(type: Jar) {
from sourceSets.main.output
dependsOn(githubRessources)
archiveName("SkDynmap-Github.jar")
}
githubRelease.finalizedBy(clean)
setLibsDirName("..\\out")
jar.finalizedBy(clean)
processResources {
filter ReplaceTokens, tokens: [
'version': project.property('version'),
'apiVersion': mcVersion
]
}