-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
111 lines (96 loc) · 2.69 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
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
import org.apache.tools.ant.filters.*
plugins {
id "java"
id "org.spongepowered.plugin" version "0.5.2"
id "com.github.johnrengelman.shadow" version "1.2.3"
id "com.jfrog.bintray" version "1.5"
id "maven"
}
repositories {
mavenCentral()
maven {
name = "sponge"
url = "http://repo.spongepowered.org/maven"
}
}
dependencies {
compile group: "org.spongepowered", name: "spongeapi", version: project.property("apiversion")
compile files("lib/Rson.jar")
}
group = project.property("groupid")
version = project.property("version")
description = "Make Silk Touch work with any block type"
sponge {
plugin {
meta {
id = project.property("groupid")
name = "SilkTouch"
version = project.property("version")
description = "Make Silk Touch work with any block type"
}
}
}
shadowJar {
baseName = "SilkTouch"
archiveName = "${baseName}-${version}.jar"
dependencies {
include(dependency(files("lib/Rson.jar")))
relocate "net.redstoneore.rson", "net.redstoneore.silktouch.lib.rson"
}
}
build.finalizedBy(shadowJar);
// ----------------------------------------
// BINTRAY
// ----------------------------------------
// jCenter requires a pom.xml file
task createPom << {
pom {
project {
groupId project.property("groupid")
artifactId "silktouch"
version project.property("version")
inceptionYear "2016"
licenses {
license {
name "GNU General Public License, version 3 (GPL-3.0)"
url "https://opensource.org/licenses/GPL-3.0"
distribution "repo"
}
}
}
}.writeTo("$buildDir/libs/pom.xml")
}
// Create sources jar
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
// Create javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// Deploy to bintray
bintray {
user = project.hasProperty("bintrayUser") ? project.property("bintrayUser") : System.getenv("BINTRAY_USER")
key = project.hasProperty("bintrayApiKey") ? project.property("bintrayApiKey") : System.getenv("BINTRAY_API_KEY")
filesSpec {
from "build/libs"
into "."
}
pkg {
repo = "maven"
name = "SilkTouch"
desc = ""
userOrg = "redstoneore"
licenses = ["GPL-3.0"]
vcsUrl = "https://github.com/redstone/SilkTouch.git"
publicDownloadNumbers = false
version {
name = "SilkTouch-" + project.property("version");
desc = "Make Silk Touch work with any block type"
vcsTag = project.property("version")
attributes = ["gradle-plugin": "com.use.less:com.use.less.gradle:gradle-useless-plugin"]
}
}
}