-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathupload-tv.gradle
66 lines (60 loc) · 1.76 KB
/
upload-tv.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
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
repositories {
mavenCentral()
jcenter()
}
ext {
appName = "SageTVMiniclient"
versionText = new File('core/src/main/java/sagex/miniclient/Version.java').text
baseVersion = (versionText =~ /VERSION = "([^"]+)"/)[0][1]
}
task(copyFiles) {
print "Copy Files for Upload..."
delete {
fileTree(dir: "build", include: "*.apk")
}
copy {
from "android-tv/build/outputs/apk/release/"
into "build"
include "*-release.apk"
rename('(.+)\\.(.+)', "sagetv-miniclient-${baseVersion}.\$2")
eachFile { println it.file }
}
}
bintrayUpload.dependsOn copyFiles
// Upload tasks
// use ./gradlew bintrayUpload
// make sure your BINTRAY_API is set in the environment
//
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_API");
filesSpec {
// from 'build/release'
from('build') {
include '*.apk'
}
into "AndroidMiniClient/${baseVersion}"
}
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'sagetv'
name = 'AndroidMiniClient'
userOrg = 'opensagetv'
desc = "Android MiniClient Release"
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/google/sagetv'
labels = ['sagetv', 'miniclient', 'tv']
publicDownloadNumbers = true
version {
name = "$baseVersion"
released = new Date()
desc = "Android MiniClient ${baseVersion}"
//vcsTag = "V${version}"
//attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
}