diff --git a/README.md b/README.md index 978acea..9e5e7e1 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Installation of the QubitSDK, to provide event tracking and lookup. To make use | VERSION | UPDATES | |---|---| +| 2.0.1 | Resolve caching issue when campaigns are paused. | 2.0.0 | Major release, bringing support for Placement API. Upgrade to 2.* to use this feature. | 1.4.1 | Handle potential regression where /experiences endpoint does not return expected payload. | 1.4.0 | Production release for A/B testing & data collection. @@ -19,7 +20,7 @@ In `build.gradle` of your Android application module (usually *$projectRoot/app/ ``` dependencies { - compile 'com.qubit:qubit-sdk-android:2.0.0' + compile 'com.qubit:qubit-sdk-android:2.0.1' } ``` diff --git a/publish-mavencentral.gradle b/publish-mavencentral.gradle new file mode 100644 index 0000000..20ebcee --- /dev/null +++ b/publish-mavencentral.gradle @@ -0,0 +1,42 @@ +apply plugin: 'maven-publish' +apply plugin: 'signing' + +ext["signing.keyId"] = '' +ext["signing.password"] = '' +ext["signing.secretKeyRingFile"] = '' +ext["ossrhUsername"] = '' +ext["ossrhPassword"] = '' + +File secretPropsFile = project.rootProject.file('local.properties') +if (secretPropsFile.exists()) { + Properties p = new Properties() + new FileInputStream(secretPropsFile).withCloseable { is -> + p.load(is) + } + p.each { name, value -> + ext[name] = value + } +} else { + ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') + ext["signing.password"] = System.getenv('SIGNING_PASSWORD') + ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') + ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') + ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') +} + +publishing { + repositories { + maven { + name = "sonatype" + url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username ossrhUsername + password ossrhPassword + } + } + } +} + +signing { + sign publishing.publications +} diff --git a/qubit-sdk/build.gradle b/qubit-sdk/build.gradle index 4db0662..b8e85ef 100644 --- a/qubit-sdk/build.gradle +++ b/qubit-sdk/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -version = '2.0.0' +version = '2.0.1' ext.retrofit_version = '2.4.0' @@ -40,3 +40,4 @@ dependencies { apply from: "$rootProject.projectDir/checkstyle-config.gradle" apply from: "javadoc-config.gradle" apply from: "publishing-config.gradle" +apply from: "${rootProject.projectDir}/publish-mavencentral.gradle" diff --git a/qubit-sdk/publishing-config.gradle b/qubit-sdk/publishing-config.gradle index a8358e2..ef710d5 100644 --- a/qubit-sdk/publishing-config.gradle +++ b/qubit-sdk/publishing-config.gradle @@ -67,29 +67,3 @@ publishing { } } } - -// Bintray -apply plugin: 'com.jfrog.bintray' -bintray { - user = project.hasProperty('bintray.user') ? project.property('bintray.user') : System.getenv('BINTRAY_USER') - key = project.hasProperty('bintray.apiKey') ? project.property('bintray.apiKey') : System.getenv('BINTRAY_API_KEY') - - publications = ['mavenAar'] - publish = true - pkg { - repo = 'maven' - name = project.artifactId - desc = project.description - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = allLicenses - publicDownloadNumbers = true - githubRepo = 'qubitdigital/qubit-sdk-android' - githubReleaseNotesFile = 'README.md' - version { - name = project.version - released = new Date() - vcsTag = 'version-' + project.version - } - } -}