1+ def bintray = rootProject. ext. bintray
2+ /* ********************上传jCenter依赖*********************/
3+ apply plugin : ' com.novoda.bintray-release'
4+
5+ /* *避免中文注释:编码GBK的不可映射字符**/
6+ tasks. withType(Javadoc ) {
7+ options {
8+ encoding " UTF-8"
9+ charSet ' UTF-8'
10+ links " http://docs.oracle.com/javase/7/docs/api"
11+ }
12+ }
13+
14+ /* *避免Javadocs错误:找不到引用**/
15+ tasks. withType(Javadoc ) {
16+ options. addStringOption(' Xdoclint:none' , ' -quiet' )
17+ options. addStringOption(' encoding' , ' UTF-8' )
18+ }
19+
20+ /* *发布到我的Bintray仓库**/
21+ def user = getPropertyValue(' bintrayUser' )
22+ def key = getPropertyValue(' bintrayKey' )
23+ def org = getPropertyValue(' userOrg' )
24+
25+ publish {
26+ bintrayUser = user
27+ bintrayKey = key
28+ dryRun = false
29+ userOrg = org
30+ groupId = bintray. groupId
31+ artifactId = ' ffmpeg-armeabi'
32+ publishVersion = bintray. publishVersion
33+ desc = ' android执行FFmpeg可执行文件-armeabi'
34+ website = bintray. website
35+ licences = bintray. licences
36+ }
37+
38+ /* *读取bintray.key文件的key**/
39+ def getPropertyValue (String key ) {
40+ if (key == null || key. length() == 0 )
41+ return null
42+
43+ File file = project. rootProject. file(' ../../bintray.key' )
44+ if (! file. exists())
45+ return null
46+
47+ InputStream inputStream = file. newDataInputStream()
48+ Properties properties = new Properties ()
49+ properties. load(inputStream)
50+
51+ // 读取Key
52+ return properties. getProperty(key)
53+ }
0 commit comments