1
1
apply plugin : ' com.android.library'
2
+ apply plugin : ' com.github.dcendents.android-maven'
3
+ apply plugin : ' com.jfrog.bintray'
2
4
3
5
version = " 1.4.0"
4
6
5
7
android {
6
8
compileSdkVersion 23
7
9
buildToolsVersion " 23.0.1"
10
+ resourcePrefix " aigestudio_downloader"
8
11
9
12
defaultConfig {
10
13
minSdkVersion 1
@@ -24,3 +27,84 @@ dependencies {
24
27
compile fileTree(dir : ' libs' , include : [' *.jar' ])
25
28
}
26
29
30
+ def siteUrl = ' https://github.com/AigeStudio/MultiThreadDownloader'
31
+ def gitUrl = ' https://github.com/AigeStudio/MultiThreadDownloader.git'
32
+
33
+ group = " cn.aigestudio.downloader"
34
+
35
+ install {
36
+ repositories. mavenInstaller {
37
+ pom {
38
+ project {
39
+ packaging ' aar'
40
+ name ' A useful Downloader for Andorid implement multi thread and break-point download'
41
+ url siteUrl
42
+ licenses {
43
+ license {
44
+ name ' The Apache Software License, Version 2.0'
45
+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
46
+ }
47
+ }
48
+ developers {
49
+ developer {
50
+ id ' aigestudio'
51
+ name ' Aige'
52
+ email ' aigestudio@qq.com'
53
+ }
54
+ }
55
+ scm {
56
+ connection gitUrl
57
+ developerConnection gitUrl
58
+ url siteUrl
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ task sourcesJar (type : Jar ) {
66
+ from android. sourceSets. main. java. srcDirs
67
+ classifier = ' sources'
68
+ }
69
+
70
+ task javadoc (type : Javadoc ) {
71
+ source = android. sourceSets. main. java. srcDirs
72
+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
73
+ }
74
+
75
+ task javadocJar (type : Jar , dependsOn : javadoc) {
76
+ classifier = ' javadoc'
77
+ from javadoc. destinationDir
78
+ }
79
+
80
+ javadoc {
81
+ options{
82
+ encoding " UTF-8"
83
+ charSet ' UTF-8'
84
+ author true
85
+ version true
86
+ links " http://docs.oracle.com/javase/7/docs/api"
87
+ }
88
+ }
89
+
90
+ artifacts {
91
+ archives javadocJar
92
+ archives sourcesJar
93
+ }
94
+
95
+ Properties properties = new Properties ()
96
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
97
+
98
+ bintray {
99
+ user = properties. getProperty(" bintray.user" )
100
+ key = properties. getProperty(" bintray.apikey" )
101
+ configurations = [' archives' ]
102
+ pkg {
103
+ repo = " maven"
104
+ name = " MultiThreadDownloader"
105
+ websiteUrl = siteUrl
106
+ vcsUrl = gitUrl
107
+ licenses = [" Apache-2.0" ]
108
+ publish = true
109
+ }
110
+ }
0 commit comments