-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
66 lines (56 loc) · 1.97 KB
/
build.gradle
File metadata and controls
66 lines (56 loc) · 1.97 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
plugins {
id "com.jfrog.bintray" version "1.6"
}
group 'com.vcsajen'
version '1.0.0'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
def bintrayVersion = getVersion()+(System.getenv('TRAVIS') ? "."+System.getenv('TRAVIS_BUILD_NUMBER') : ".0")
def bintrayProjName = rootProject.name
setVersion(getVersion()+(System.getenv('TRAVIS') ? "."+System.getenv('TRAVIS_BUILD_NUMBER') : ".0")+(System.getenv('TRAVIS_TAG') ? "" : (System.getenv('TRAVIS') ? "-"+System.getenv('TRAVIS_COMMIT').take(7) : "")+"-SNAPSHOT"))
def getSecret(String secretname){
def result = System.getenv(secretname)
if (result != null && result != "") return result;
def Properties props = new Properties()
props.load(new FileInputStream(new File('secrets.properties')))
return props[secretname]
}
configurations {
myCode
}
dependencies {
compile 'org.spongepowered:spongeapi:4.1.0-SNAPSHOT'
compile group: 'org.kefirsf', name: 'kefirbb', version: '1.1'
myCode group: 'org.kefirsf', name: 'kefirbb', version: '1.1'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
jar {
from configurations.myCode.collect { it.isDirectory() ? it : zipTree(it) }
}
bintray {
user = getSecret('BINTRAY_USER_NAME')
key = getSecret('BINTRAY_API_KEY')
configurations = ['archives']
pkg {
repo = 'generic'
name = 'BBCodeForSponge'
publish = true
userOrg = user
licenses = ['MIT']
vcsUrl = 'https://github.com/VcSaJen/BBCodeForSponge.git'
version {
name = bintrayVersion.toString()
desc = bintrayProjName.toString() + bintrayVersion.toString()
released = new Date()
vcsTag = System.getenv('TRAVIS_TAG') ? System.getenv('TRAVIS_TAG') : System.getenv('TRAVIS_COMMIT')
}
}
}