@@ -8,7 +8,7 @@ apply plugin: 'com.github.dcendents.android-maven'
8
8
9
9
android {
10
10
compileSdkVersion 30
11
- buildToolsVersion " 30.0.0 "
11
+ buildToolsVersion " 30.0.1 "
12
12
13
13
compileOptions {
14
14
sourceCompatibility JavaVersion . VERSION_1_8
@@ -23,8 +23,8 @@ android {
23
23
minSdkVersion 21
24
24
targetSdkVersion 30
25
25
26
- versionCode 11
27
- versionName " 0.4.6 "
26
+ versionCode 13
27
+ versionName " 0.5.1 "
28
28
29
29
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
30
30
consumerProguardFiles ' consumer-rules.pro'
@@ -61,7 +61,7 @@ dependencies {
61
61
implementation " androidx.work:work-runtime-ktx:2.3.4"
62
62
63
63
// OkHttp
64
- def okhttp3_version = ' 4.7.2 '
64
+ def okhttp3_version = ' 4.8.0 '
65
65
implementation " com.squareup.okhttp3:okhttp:$okhttp3_version "
66
66
implementation " com.squareup.okhttp3:logging-interceptor:$okhttp3_version "
67
67
@@ -102,18 +102,103 @@ dependencies {
102
102
// implementation "com.greymass:esrsdk:1.0.1"
103
103
}
104
104
105
+ ext {
106
+ bintrayRepo = " ProtonKotlin"
107
+ bintrayName = " com.metallicus.protonsdk"
108
+ userOrganization = " protonprotocol"
109
+
110
+ libraryName = " protonsdk"
111
+
112
+ publishedGroupId = " com.metallicus"
113
+ artifact = " protonsdk"
114
+ libraryVersion = android. defaultConfig. versionName
115
+
116
+ libraryDescription = " Kotlin library for handling Proton Chain operations"
117
+ siteUrl = " https://github.com/ProtonProtocol/ProtonKotlin"
118
+ gitUrl = " https://github.com/ProtonProtocol/ProtonKotlin.git"
119
+ developerId = " joey-harward"
120
+ developerName = " Metallicus Inc."
121
+ developerEmail
= " [email protected] "
122
+ licenseName = " MIT License"
123
+ licenseUrl = " https://opensource.org/licenses/MIT"
124
+ allLicenses = [" MIT" ]
125
+ }
126
+
127
+ group = publishedGroupId
128
+ version = libraryVersion
129
+
130
+ task sourcesJar (type : Jar ) {
131
+ archiveClassifier. set(' sources' )
132
+ from android. sourceSets. main. java. srcDirs
133
+ }
134
+
135
+ def pomConfig = {
136
+ licenses {
137
+ license {
138
+ name licenseName
139
+ url licenseUrl
140
+ }
141
+ }
142
+ developers {
143
+ developer {
144
+ id developerId
145
+ name developerName
146
+ email developerEmail
147
+ }
148
+ }
149
+ scm {
150
+ connection gitUrl
151
+ developerConnection gitUrl
152
+ url siteUrl
153
+ }
154
+ }
155
+
105
156
project. afterEvaluate {
106
157
publishing {
107
158
publications {
108
- aar (MavenPublication ) {
159
+ ProtonSDKDebug (MavenPublication ) {
109
160
groupId = ' com.metallicus'
110
- artifactId ' protonsdk '
161
+ artifactId = " ${ project.getName() } -debug "
111
162
version = android. defaultConfig. versionName
112
163
113
164
artifact bundleDebugAar
114
165
115
166
pom. withXml {
116
- def dependenciesNode = asNode(). appendNode(' dependencies' )
167
+ def root = asNode()
168
+ root. appendNode(' name' , libraryName)
169
+ root. appendNode(' description' , libraryDescription)
170
+ root. appendNode(' url' , siteUrl)
171
+ root. children(). last() + pomConfig
172
+
173
+ def dependenciesNode = root. appendNode(' dependencies' )
174
+ configurations. implementation. allDependencies. each {
175
+ if (it. group != null && it. name != null && it. version != null &&
176
+ it. name != ' unspecified' && it. version != ' unspecified' ) {
177
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
178
+ dependencyNode. appendNode(' groupId' , it. group)
179
+ dependencyNode. appendNode(' artifactId' , it. name)
180
+ dependencyNode. appendNode(' version' , it. version)
181
+ }
182
+ }
183
+ }
184
+ }
185
+
186
+ ProtonSDKRelease (MavenPublication ) {
187
+ groupId = ' com.metallicus'
188
+ artifactId project. getName()
189
+ version = android. defaultConfig. versionName
190
+
191
+ artifact bundleReleaseAar
192
+ artifact sourcesJar
193
+
194
+ pom. withXml {
195
+ def root = asNode()
196
+ root. appendNode(' name' , libraryName)
197
+ root. appendNode(' description' , libraryDescription)
198
+ root. appendNode(' url' , siteUrl)
199
+ root. children(). last() + pomConfig
200
+
201
+ def dependenciesNode = root. appendNode(' dependencies' )
117
202
configurations. implementation. allDependencies. each {
118
203
if (it. group != null && it. name != null && it. version != null &&
119
204
it. name != ' unspecified' && it. version != ' unspecified' ) {
@@ -128,3 +213,40 @@ project.afterEvaluate {
128
213
}
129
214
}
130
215
}
216
+
217
+ project. afterEvaluate {
218
+ bintray {
219
+ if (project. rootProject. file(' local.properties' ). exists()) {
220
+ Properties properties = new Properties ()
221
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
222
+
223
+ user = properties. getProperty(" bintray.user" )
224
+ key = properties. getProperty(" bintray.apikey" )
225
+
226
+ publications = [' ProtonSDKRelease' ]
227
+
228
+ pkg {
229
+ repo = bintrayRepo
230
+ name = bintrayName
231
+ userOrg = userOrganization
232
+ desc = libraryDescription
233
+ websiteUrl = siteUrl
234
+ vcsUrl = gitUrl
235
+ licenses = allLicenses
236
+ publish = true
237
+ publicDownloadNumbers = true
238
+ version {
239
+ name = libraryVersion
240
+ desc = libraryDescription
241
+ released = new Date ()
242
+
243
+ // gpg {
244
+ // sign = true //Determines whether to GPG sign the files. The default is false
245
+ // passphrase = properties.getProperty("bintray.gpg.password")
246
+ // //Optional. The passphrase for GPG signing'
247
+ // }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
0 commit comments