1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' com.github.dcendents.android-maven'
3
- apply plugin : ' com.jfrog.bintray'
2
+ apply plugin : ' com.github.ben-manes.versions'
4
3
apply plugin : ' com.github.hierynomus.license'
5
4
6
5
android {
7
6
compileSdkVersion COMPILE_SDK_VERSION as int
8
- buildToolsVersion BUILD_TOOLS_VERSION
9
7
resourcePrefix ' stl_'
10
8
11
9
defaultConfig {
12
- minSdkVersion 4
10
+ minSdkVersion 14
13
11
targetSdkVersion COMPILE_SDK_VERSION as int
14
12
versionCode VERSION_CODE as int
15
13
versionName VERSION_NAME
@@ -21,13 +19,10 @@ android {
21
19
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
22
20
}
23
21
}
24
- lintOptions {
25
- abortOnError false
26
- }
27
22
}
28
23
29
24
dependencies {
30
- compile " com.android.support:support-v4:22.2.1 "
25
+ implementation " com.android.support:support-v4:${ ANDROID_SUPPORT_VERSION } "
31
26
}
32
27
33
28
license {
@@ -41,135 +36,5 @@ license {
41
36
42
37
}
43
38
44
- afterEvaluate { project ->
45
-
46
- task sourcesJar(type : Jar ) {
47
- from android. sourceSets. main. java. srcDirs
48
- classifier = ' sources'
49
- }
50
-
51
- task javadoc(type : Javadoc ) {
52
- failOnError false
53
- source = android. sourceSets. main. java. srcDirs
54
- options {
55
- links " http://docs.oracle.com/javase/7/docs/api/"
56
- linksOffline " http://d.android.com/reference" , System . getenv(" ANDROID_HOME" ) + " /docs/reference"
57
- }
58
- classpath + = project. android. libraryVariants. toList(). first(). javaCompile. classpath
59
- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
60
-
61
- }
62
-
63
- task javadocJar(type : Jar , dependsOn : javadoc) {
64
- classifier = ' javadoc'
65
- from javadoc. destinationDir
66
- }
67
-
68
- artifacts {
69
- archives javadocJar
70
- archives sourcesJar
71
- }
72
-
73
- }
74
-
75
- install {
76
- repositories. mavenInstaller {
77
- // This generates POM.xml with proper parameters
78
- pom {
79
- project {
80
- packaging ' aar'
81
-
82
- name ARTIFACT_NAME
83
- description ARTIFACT_DESCRIPTION
84
- url SITE_URL
85
-
86
- licenses {
87
- license {
88
- name LICENCE_NAME
89
- url LICENCE_URL
90
- distribution LICENCE_DIST
91
- }
92
- }
93
-
94
- developers {
95
- developer {
96
- id DEVELOPER_ID
97
- name DEVELOPER_NAME
98
- email DEVELOPER_EMAIL
99
- }
100
- }
101
- issueManagement {
102
- system ISSUE_SYSTEM
103
- url ISSUE_URL
104
- }
105
-
106
- scm {
107
- connection SCM_CONNECTION
108
- developerConnection SCM_DEV_CONNECTION
109
- url SCM_URL
110
-
111
- }
112
- }
113
- }
114
- }
115
- }
116
-
117
- def getNexusUser () {
118
- return hasProperty(' NEXUS_USER' ) ? NEXUS_USER : " "
119
- }
120
-
121
- def getNexusPassword () {
122
- return hasProperty(' NEXUS_PASSWORD' ) ? NEXUS_PASSWORD : " "
123
- }
124
-
125
- def getBintrayUser () {
126
- return hasProperty(' BINTRAY_USER' ) ? BINTRAY_USER : " "
127
- }
128
-
129
- def getBintrayApiKey () {
130
- return hasProperty(' BINTRAY_APIKEY' ) ? BINTRAY_APIKEY : " "
131
- }
132
-
133
- def getGpgPassphrase () {
134
- return hasProperty(' BINTRAY_GPG_PASSPHRASE' ) ? BINTRAY_GPG_PASSPHRASE : " "
135
- }
136
-
137
- bintray {
138
-
139
- user = bintrayUser
140
- key = bintrayApiKey
141
-
142
- configurations = [' archives' ]
143
-
144
- dryRun = false
145
- publish = true
146
-
147
- pkg {
148
- repo = " maven"
149
- name = ARTIFACT_NAME
150
- desc = ARTIFACT_DESCRIPTION
151
- websiteUrl = SITE_URL
152
- issueTrackerUrl = ISSUE_URL
153
- vcsUrl = SCM_URL
154
- licenses = [" Apache-2.0" ]
155
- labels = [' android' ]
156
- publicDownloadNumbers = true
157
-
158
- version {
159
- gpg {
160
- sign = true
161
- passphrase = gpgPassphrase
162
- }
163
-
164
- mavenCentralSync {
165
- sync = true
166
- user = nexusUser
167
- password = nexusPassword
168
- close = ' 1'
169
- }
170
-
171
- }
172
-
173
- }
174
-
175
- }
39
+ pkginfo. name = ARTIFACT_NAME
40
+ apply from : " ${ project.rootDir} /publish.gradle"
0 commit comments