Skip to content

Commit 03ab6f9

Browse files
Merge pull request #104 from PaystackHQ/fix/transitive-dependencies
Fix issue where transitive dependencies weren't bundled with library
2 parents 689c4c8 + 2ef8264 commit 03ab6f9

5 files changed

Lines changed: 91 additions & 15 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/co.paystack.android/paystack-android/badge.svg)](https://maven-badges.herokuapp.com/maven-central/co.paystack.android/paystack-android)
2-
[![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=plastic)](https://android-arsenal.com/api?level=16)
1+
[ ![Download](https://api.bintray.com/packages/paystack/maven/paystack-android/images/download.svg) ](https://bintray.com/paystack/maven/paystack-android/_latestVersion)
2+
[![Min API](https://img.shields.io/badge/API-16%2B-blue.svg?style=plastic)](https://android-arsenal.com/api?level=16)
33

44

55

@@ -37,10 +37,11 @@ You do not need to clone this repository or download the files. Just add the fol
3737

3838
```gradle
3939
dependencies {
40-
implementation 'co.paystack.android.design.widget:pinpad:1.0.4'
41-
implementation 'co.paystack.android:paystack:3.0.17'
40+
implementation 'co.paystack.android:paystack:3.0.18'
4241
}
4342
```
43+
From version `3.0.18`, the Pinpad library comes as part of this library and does not need to be explicitly included in your dependencies.
44+
4445

4546
### Eclipse
4647
To use this library with Eclipse, you need to:
@@ -59,7 +60,7 @@ To prepare for use, you must ensure that your app has internet permissions by ma
5960
<uses-permission android:name="android.permission.INTERNET" />
6061
```
6162

62-
### 1. initializeSdk
63+
### 1. Initialize SDK
6364

6465
To use the Paystack Android SDK, you need to first initialize it using the `PaystackSdk` class.
6566

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.6.1'
9+
classpath 'com.android.tools.build:gradle:4.0.0'
1010
classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
11-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
1212
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
@@ -26,9 +26,9 @@ ext {
2626
compileSdkVersion = 29
2727
minSdkVersion = 16
2828
targetSdkVersion = 29
29-
versionCode = 26
29+
versionCode = 27
3030

3131
buildToolsVersion = "29.0.2"
3232
supportLibraryVersion = "28.0.0"
33-
versionName = "3.0.17"
33+
versionName = "3.0.18"
3434
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Mar 25 12:49:33 WAT 2020
1+
#Wed Jun 03 13:36:41 WAT 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

paystack/bintray-config.gradle

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apply plugin: 'com.jfrog.bintray'
2+
3+
version = libraryVersion
4+
5+
task sourcesJar(type: Jar) {
6+
from android.sourceSets.main.java.srcDirs
7+
classifier = 'sources'
8+
}
9+
10+
task javadoc(type: Javadoc) {
11+
source = android.sourceSets.main.java.srcDirs
12+
classpath += configurations.compile
13+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
14+
}
15+
16+
task javadocJar(type: Jar, dependsOn: javadoc) {
17+
classifier = 'javadoc'
18+
from javadoc.destinationDir
19+
}
20+
artifacts {
21+
// archives javadocJar
22+
archives sourcesJar
23+
}
24+
25+
// Bintray
26+
Properties properties = new Properties()
27+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
28+
29+
bintray {
30+
user = properties.getProperty("bintray.user")
31+
key = properties.getProperty("bintray.apikey")
32+
publications = ['library']
33+
34+
configurations = ['archives']
35+
pkg {
36+
repo = bintrayRepo
37+
name = bintrayName
38+
desc = libraryDescription
39+
publish = true
40+
publicDownloadNumbers = true
41+
version {
42+
desc = libraryDescription
43+
// Optional. The passphrase for GPG signing'
44+
gpg {
45+
sign = true //Determines whether to GPG sign the files. The default is false
46+
passphrase = properties.getProperty("bintray.gpg.password")
47+
}
48+
}
49+
}
50+
}

paystack/build.gradle

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'com.android.library'
22
apply plugin: "com.jfrog.bintray"
33
apply plugin: 'com.github.dcendents.android-maven'
4+
apply plugin: 'maven-publish'
45

56
android {
67
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -30,13 +31,38 @@ android {
3031
dependencies {
3132
implementation fileTree(dir: 'libs', include: ['*.jar'])
3233
implementation 'com.google.code.gson:gson:2.8.5'
33-
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
34+
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
3435
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
35-
implementation 'com.squareup.okhttp3:okhttp:3.14.6'
36+
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
3637
implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
3738
implementation 'co.paystack.android.design.widget:pinpad:1.0.4'
3839
}
3940

41+
project.afterEvaluate {
42+
publishing {
43+
publications {
44+
library(MavenPublication) {
45+
setGroupId 'co.paystack.android'
46+
setArtifactId 'paystack'
47+
version android.defaultConfig.versionName
48+
artifact bundleReleaseAar
49+
50+
pom.withXml {
51+
def dependenciesNode = asNode().appendNode('dependencies')
52+
configurations.implementation.allDependencies.each {
53+
if (it.name != 'unspecified') {
54+
def dependencyNode = dependenciesNode.appendNode('dependency')
55+
dependencyNode.appendNode('groupId', it.group)
56+
dependencyNode.appendNode('artifactId', it.name)
57+
dependencyNode.appendNode('version', it.version)
58+
}
59+
}
60+
}
61+
}
62+
}
63+
}
64+
}
65+
4066
ext {
4167
// Where you will see your artifact in Bintray's web interface
4268
// The "bintrayName" should match the name of the Bintray repro.
@@ -64,6 +90,5 @@ ext {
6490
licenseUrl = 'https://raw.githubusercontent.com/PaystackHQ/paystack-android/master/LICENSE.txt'
6591
allLicenses = ["Apache-2.0"]
6692
}
67-
6893
apply from: 'https://raw.githubusercontent.com/ibrahimlawal/JCenter/master/installv1.gradle'
69-
apply from: 'https://raw.githubusercontent.com/ibrahimlawal/JCenter/master/bintrayv1.gradle'
94+
apply from: "$rootProject.projectDir/paystack/bintray-config.gradle"

0 commit comments

Comments
 (0)