-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (53 loc) · 1.7 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
plugins {
id 'java'
id 'org.spongepowered.plugin' version '0.9.0'
id "net.kyori.blossom" version "1.1.0"
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
apply plugin: 'com.github.johnrengelman.shadow'
compileJava.options.encoding = 'UTF-8'
//获取commits数量
String command2 = "git rev-list --count --first-parent HEAD"
String v2=command2.execute().text.trim()
group = pluginGroup
//给metadata生成version
try{
pluginVersion = pluginVersion+"b"+Integer.parseInt(v2)
}catch(Exception e){
pluginVersion = pluginVersion+"Test"
}
//包名的version部分
version=pluginVersion
blossom {
replaceToken '@id@', pluginId
replaceToken '@version@', pluginVersion
replaceToken '@name@', pluginName
replaceToken '@description@', "一个简单的仪表盘数据推送插件"
}
repositories {
mavenCentral()
maven {
name "CodeMC"
url "https://repo.codemc.org/repository/maven-public"
}
}
dependencies {
compile 'org.bstats:bstats-sponge:1.7'
compile 'org.fusesource:sigar:1.6.4'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'org.influxdb:influxdb-java:2.10'
compileOnly 'org.spongepowered:spongeapi:7.1.0'
annotationProcessor 'org.spongepowered:spongeapi:7.1.0'
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
}
/*
shadowJar {
classifier = ""
dependencies {
include(dependency('com.squareup.okhttp3:okhttp:3.6.0'))
include(dependency('com.squareup.retrofit2:retrofit:2.3.0'))
include(dependency('org.influxdb:influxdb-java:2.10'))
}
}*/