-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle
More file actions
42 lines (34 loc) · 1.19 KB
/
Copy pathbuild.gradle
File metadata and controls
42 lines (34 loc) · 1.19 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
plugins {
id 'org.spongepowered.plugin' version '0.8.1'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'ninja.miserable.blossom' version '1.0.1'
}
version = project.pluginVersion + "-s" + project.spongeApiVersion + project.suffix
dependencies {
implementation("org.spongepowered:spongeapi:" + project.spongeApiVersion)
implementation('com.github.KasperFranz:BCLForgeLib:master')
}
blossom {
def location = 'src/main/java/guru/franz/mc/bcl/BetterChunkLoaderPluginInfo.java'
replaceToken '@name@', project.name, location
replaceToken '@version@', project.version + "-" + getGitHash(), location
replaceToken '@description@', project.description, location
replaceToken '@authors@', project.authors, location
}
static String getGitHash() {
def process = 'git rev-parse --short HEAD'.execute()
process.waitFor()
return process.exitValue() ? 'unknown' : process.text.trim()
}
repositories {
jcenter()
maven {
name 'Sponge maven repo'
url 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {url 'https://jitpack.io'}
maven {url 'https://repo.codemc.org/repository/maven-public/'}
}
artifacts {
shadowJar
}