diff --git a/.gitignore b/.gitignore index 9eda3a803..35414c564 100644 --- a/.gitignore +++ b/.gitignore @@ -57,4 +57,12 @@ freeline/ freeline_project_description.json # MacOS generated files -.DS_Store \ No newline at end of file +.DS_Store + +# [Maven] ======================== +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 209b65b90..38fab881d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). #### Fixed - nothing yet +## [3.2.14](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.2.14) +#### Fixed +- Non-silent inbox messages will now properly account for the read state. + ## [3.2.13](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.2.13) #### Added - In-app message prioritization - Ordering the display of in-app messages based on a priority you select in Iterable when creating in-app campaigns diff --git a/build.gradle b/build.gradle index e49084e67..68fb165ba 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.3.72' + ext.mavenPublishEnabled = true repositories { google() jcenter() diff --git a/gradle.properties b/gradle.properties index 915f0e66f..5b96422c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,20 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true + +GROUP=com.iterable + +POM_DESCRIPTION= Iterable is a growth marketing platform that helps you to create better experiences for—and deeper relationships with—your customers. Use it to send customized email, SMS, push notification, in-app message and web push notifications to your customers. This SDK helps you integrate your Android apps with Iterable. It supports Android API versions 15+. +POM_URL=https://github.com/Iterable/iterable-android-sdk.git +POM_SCM_URL=https://github.com/Iterable/iterable-android-sdk.git +POM_SCM_CONNECTION=git@github.com:Iterable/iterable-android-sdk.git +POM_SCM_DEV_CONNECTION=scm:git@github.com:Iterable/iterable-android-sdk.git +POM_LICENCE_NAME=The Apache Software License, Version 2.0 +POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt +POM_LICENCE_DIST=repo +POM_DEVELOPER_ID=Iterable +POM_DEVELOPER_NAME=Iterable +POM_PACKAGING=aar + +org.gradle.daemon=true \ No newline at end of file diff --git a/iterableapi-ui/build.gradle b/iterableapi-ui/build.gradle index d78404577..8f5eda46b 100644 --- a/iterableapi-ui/build.gradle +++ b/iterableapi-ui/build.gradle @@ -52,7 +52,7 @@ ext { siteUrl = 'https://github.com/Iterable/iterable-android-sdk' gitUrl = 'https://github.com/Iterable/iterable-android-sdk.git' - libraryVersion = '3.2.13' + libraryVersion = '3.2.14' developerId = 'davidtruong' developerName = 'David Truong' @@ -66,6 +66,9 @@ ext { apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' +if(hasProperty("mavenPublishEnabled")) { + apply from: '../maven-push.gradle' +} // A hack to import the classpath and BuildConfig into the javadoc task afterEvaluate { diff --git a/iterableapi/build.gradle b/iterableapi/build.gradle index b39d99c8c..2391c8662 100644 --- a/iterableapi/build.gradle +++ b/iterableapi/build.gradle @@ -10,7 +10,7 @@ android { minSdkVersion 15 targetSdkVersion 27 - buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.2.13\"" + buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.2.14\"" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -72,7 +72,7 @@ ext { siteUrl = 'https://github.com/Iterable/iterable-android-sdk' gitUrl = 'https://github.com/Iterable/iterable-android-sdk.git' - libraryVersion = '3.2.13' + libraryVersion = '3.2.14' developerId = 'davidtruong' developerName = 'David Truong' @@ -86,6 +86,10 @@ ext { apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' +if(hasProperty("mavenPublishEnabled")) { + apply from: '../maven-push.gradle' +} + tasks.withType(Test) { jacoco.includeNoLocationClasses = true } diff --git a/maven-push.gradle b/maven-push.gradle new file mode 100644 index 000000000..cfcb2bb4e --- /dev/null +++ b/maven-push.gradle @@ -0,0 +1,118 @@ +/* + * Copyright 2013 Chris Banes + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: 'maven' +apply plugin: 'signing' + +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +def isReleaseBuild() { + return libraryVersion.contains("SNAPSHOT") == false +} + +def getReleaseRepositoryUrl() { + return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL + : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" +} + +def getSnapshotRepositoryUrl() { + return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL + : "https://oss.sonatype.org/content/repositories/snapshots/" +} + +def getRepositoryUsername() { + return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" +} + +def getRepositoryPassword() { + return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" +} + +def keyID = properties.getProperty("signing.keyId") +def password = properties.getProperty("signing.password") +def keyRingLocation = properties.getProperty("signing.secretKeyRingFile") +def nexus_username = properties.getProperty("NEXUS_USERNAME") +def nexus_password = properties.getProperty("NEXUS_PASSWORD") + +ext."signing.keyId" = keyID +ext."signing.secretKeyRingFile" = keyRingLocation +ext."signing.password" = password + +afterEvaluate { project -> + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + pom.groupId = GROUP + pom.artifactId = libraryName + pom.version = libraryVersion + + repository(url: getReleaseRepositoryUrl()) { + authentication(userName: nexus_username, password: nexus_password) + } + snapshotRepository(url: getSnapshotRepositoryUrl()) { + authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) + } + + pom.project { + name libraryName + packaging POM_PACKAGING + description POM_DESCRIPTION + url POM_URL + + scm { + url POM_SCM_URL + connection POM_SCM_CONNECTION + developerConnection POM_SCM_DEV_CONNECTION + } + + licenses { + license { + name POM_LICENCE_NAME + url POM_LICENCE_URL + distribution POM_LICENCE_DIST + } + } + + developers { + developer { + id POM_DEVELOPER_ID + name POM_DEVELOPER_NAME + } + } + } + } + } + } + + signing { +// required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } + required true + sign configurations.archives + } + + + task androidSourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.sourceFiles + } + + artifacts { + archives androidSourcesJar + } +} \ No newline at end of file diff --git a/sample-apps/inbox-customization/app/build.gradle b/sample-apps/inbox-customization/app/build.gradle index 73da53461..e001a2531 100644 --- a/sample-apps/inbox-customization/app/build.gradle +++ b/sample-apps/inbox-customization/app/build.gradle @@ -33,8 +33,8 @@ dependencies { implementation 'androidx.navigation:navigation-ui-ktx:2.1.0' implementation 'com.google.android.material:material:1.1.0' - implementation 'com.iterable:iterableapi:3.2.13' - implementation 'com.iterable:iterableapi-ui:3.2.13' + implementation 'com.iterable:iterableapi:3.2.14' + implementation 'com.iterable:iterableapi-ui:3.2.14' implementation 'com.squareup.okhttp3:mockwebserver:4.2.2' testImplementation 'junit:junit:4.12'