Skip to content

Commit 85cc825

Browse files
committed
发布1.0.0
1 parent 9770d0c commit 85cc825

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

AndroidExecLibrary/build.gradle

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,68 @@ dependencies {
3232
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
3333
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
3434
}
35+
36+
/*********************上传jCenter依赖*********************/
37+
apply plugin: 'com.novoda.bintray-release'
38+
39+
buildscript {
40+
repositories {
41+
jcenter()
42+
}
43+
dependencies {
44+
classpath 'com.android.tools.build:gradle:2.3.3'
45+
classpath 'com.novoda:bintray-release:0.8.0'
46+
// NOTE: Do not place your application dependencies here; they belong
47+
// in the individual module build.gradle files
48+
}
49+
}
50+
51+
/**避免中文注释:编码GBK的不可映射字符**/
52+
tasks.withType(Javadoc) {
53+
options {
54+
encoding "UTF-8"
55+
charSet 'UTF-8'
56+
links "http://docs.oracle.com/javase/7/docs/api"
57+
}
58+
}
59+
60+
/**避免Javadocs错误:找不到引用**/
61+
tasks.withType(Javadoc) {
62+
options.addStringOption('Xdoclint:none', '-quiet')
63+
options.addStringOption('encoding', 'UTF-8')
64+
}
65+
66+
/**发布到我的Bintray仓库**/
67+
def user = getPropertyValue('bintrayUser')
68+
def key = getPropertyValue('bintrayKey')
69+
def org = getPropertyValue('userOrg')
70+
71+
publish {
72+
bintrayUser = user
73+
bintrayKey = key
74+
dryRun = false
75+
userOrg = org
76+
groupId = 'com.excellence'
77+
artifactId = 'exec'
78+
publishVersion = '1.0.0'
79+
desc = 'android命令执行'
80+
website = 'https://github.com/VeiZhang/AndroidExec'
81+
licences = ['Apache-2.0']
82+
}
83+
84+
/**读取bintray.key文件的key**/
85+
def getPropertyValue(String key) {
86+
if (key == null || key.length() == 0)
87+
return null
88+
89+
File file = project.rootProject.file('../../bintray.key')
90+
if (!file.exists())
91+
return null
92+
93+
InputStream inputStream = file.newDataInputStream()
94+
Properties properties = new Properties()
95+
properties.load(inputStream)
96+
97+
//读取Key
98+
return properties.getProperty(key)
99+
}

0 commit comments

Comments
 (0)