forked from jcasbin/casbin-spring-boot-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
travis.gradle
45 lines (41 loc) · 1.3 KB
/
travis.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
import groovy.json.JsonBuilder
def packageDir = "${GROUP.replace('.', '/')}/${ARTIFACT_ID}"
task writeDescriptor {
def builder = new JsonBuilder()
def root = builder {
'package' {
name ARTIFACT_ID
repo 'maven'
subject BINTRAY_SUBJECT
desc POM_DESCRIPTION
website_url POM_URL
issue_tracker_url ISSUE_URL
vcs_url GIT_URL
github_use_tag_release_notes true
github_release_notes_file 'README.md'
licenses POM_LICENCE_NAME
// labels 'labels'
public_download_numbers true
}
'version' {
name VERSION_CODE
desc POM_DESCRIPTION
released new Date().format('yyyy-MM-dd')
vcs_tag VERSION_CODE
gpgSign true
}
publish true
}
root.files = []
root.files.add([
'includePattern': 'build/libs/(.*\\.(jar|pom))',
'uploadPattern' : "$packageDir/$VERSION_CODE/\$1",
'matrixParams' : [
'override': 1
]
])
def jsonFile = new File("$buildDir/descriptor.json")
if (!jsonFile.parentFile.exists()) jsonFile.parentFile.mkdirs()
jsonFile.write(builder.toPrettyString())
}
build.dependsOn('writeDescriptor')