Skip to content

Commit

Permalink
Merge pull request #10 from deltaDNA/5.0.1
Browse files Browse the repository at this point in the history
5.0.1
  • Loading branch information
unity-thull authored Jan 24, 2022
2 parents a850654 + 99a0c78 commit fdcfcd6
Show file tree
Hide file tree
Showing 42 changed files with 540 additions and 657 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- name: Publish package
run: ./gradlew uploadArchives
run: ./gradlew publishReleasePublicationToGithubRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [5.0.1](https://github.com/deltaDNA/android-sdk/releases/tag/5.0.1)

## Fixed
- When switching environments between Dev and Live, data will be cleaned so that events are not sent to the wrong environment during testing
- Notifications will launch and open correctly on the latest version of Android

## [5.0.0](https://github.com/deltaDNA/android-sdk/releases/tag/5.0.0)

## New
Expand Down
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ allprojects {
```
在你APP的构建脚本
```groovy
compile 'com.deltadna.android:deltadna-sdk:5.0.0'
compile 'com.deltadna.android:deltadna-sdk:5.0.1'
```

## 初始化
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ allprojects {
In your app's build script:
```groovy
dependencies {
implementation 'com.deltadna.android:deltadna-sdk:5.0.0'
implementation 'com.deltadna.android:deltadna-sdk:5.0.1'
}
```
The Java source and target compatibility needs to be set to 1.8 in you app's build script:
Expand All @@ -69,6 +69,9 @@ The SDK needs to be initialised with the following parameters in an `Application
* `collectUrl`, this is the address of the server that will be collecting your events.
* `engageUrl`, this is the address of the server that will provide real-time A/B Testing and Targeting.

> Note: If the SDK detects that the environment has changed between runs (for example during testing) then the event store will be cleared, to avoid sending events
> to the wrong environment.
It is a requirement in versions 5.0.0 and above to check if a user is in a location where PIPL consent is required, and to provide that consent if so. This must
be done before the SDK will send any events or make any engage requests.

Expand Down
75 changes: 27 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
buildscript {
ext {
firebaseVersion = '20.2.0'
kotlinVersion = '1.3.10'
kotlinxCoroutinesVersion = '0.22.5'
kotlinVersion = '1.6.10'
kotlinxCoroutinesVersion = '1.3.9'
kotsonVersion = '2.5.0'
mockWebServerVersion = '2.7.5'
supportVersion = '1.0.0-beta01'
Expand All @@ -27,46 +27,43 @@ buildscript {
}

repositories {
jcenter()
google()
maven { url 'https://plugins.gradle.org/m2/' }
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath('com.dicedmelon.gradle:jacoco-android:0.1.4') {
// https://github.com/arturdm/jacoco-android-gradle-plugin/issues/42
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
classpath 'org.jacoco:org.jacoco.core:0.8.1'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.2'
classpath "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
classpath "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion"
}
}

allprojects {
repositories {
google()
maven { url 'https://maven.google.com' }
jcenter()
mavenCentral()
}
def isLibrary = it.name.startsWith('library')

if (isLibrary) {
apply plugin: 'maven-publish'
}
apply plugin: 'maven-publish'
}

subprojects {
def isLibrary = it.name.startsWith('library')


if (isLibrary) {
apply plugin: 'com.android.library'
apply plugin: 'jacoco-android'
} else {
apply plugin: 'com.android.application'
}
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'


if (isLibrary) {
// workaround for group/version not picked up through project() dependency
Expand All @@ -75,18 +72,22 @@ subprojects {
}

android {
compileSdkVersion 28
compileSdkVersion 31
buildToolsVersion '28.0.3'

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 31

versionCode 1
versionName VERSION_NAME

buildConfigField('String', logTagName, "\"$logTagValue\"")
buildConfigField('String', "VERSION_NAME", "\"$VERSION_NAME\"")

if (isLibrary) {
archivesBaseName = "${POM_ARTIFACT_ID}-${versionName}.${System.getenv("BUILD_NUMBER") ?: getSha()}"
Expand All @@ -106,12 +107,6 @@ subprojects {
includeAndroidResources = true
}
}

buildTypes {
debug {
testCoverageEnabled true
}
}
}
}

Expand All @@ -121,43 +116,27 @@ subprojects {
testImplementation 'com.google.truth:truth:0.42'
testImplementation 'com.nhaarman:mockito-kotlin:1.5.0'
testImplementation "com.squareup.okhttp:mockwebserver:$mockWebServerVersion"
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:2.3.3'
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
testImplementation 'org.json:json:20171018'
testImplementation 'org.mockito:mockito-core:2.16.0'
testImplementation 'org.robolectric:robolectric:4.0'
testImplementation 'org.json:json:20180813'
testImplementation 'org.mockito:mockito-core:4.2.0'
testImplementation 'org.robolectric:robolectric:4.7.3'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
}
} else {
dependencies
{
api "androidx.appcompat:appcompat:$supportVersion"
}

}

if (isLibrary) {
apply from: "$rootProject.projectDir/gradle/mvn-push.gradle"
dependencies {
api "androidx.appcompat:appcompat:$supportVersion"
}
}
}

wrapper {
gradleVersion = '4.4'
}

task clean(type: Delete) {
delete rootProject.buildDir
}

tasks.whenTaskAdded { task ->
if(task.name.contains("Test") || task.name.contains("test")) {
task.enabled = false
}
}

static def getSha() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}
Expand Down
3 changes: 2 additions & 1 deletion examples/demo-forget-me/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ limitations under the License.
<activity
android:name=".ExampleActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down
3 changes: 2 additions & 1 deletion examples/demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ limitations under the License.
<activity
android:name=".ExampleActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down
9 changes: 0 additions & 9 deletions examples/notifications-style/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ android {

signingConfig signingConfigs.release
}

// // https://code.google.com/p/android/issues/detail?id=187483
// // none of the suggested workarounds work so will need to wait for a fix
// releaseOptimized {
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
//
// signingConfig signingConfigs.release
// }
}
}

Expand Down
6 changes: 4 additions & 2 deletions examples/notifications-style/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ limitations under the License.
<activity
android:name=".ExampleActivity"
android:label="@string/example_title"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -41,7 +42,8 @@ limitations under the License.

<!-- manually added -->
<service
android:name="com.deltadna.android.sdk.notifications.example.StyledNotificationListenerService">
android:name="com.deltadna.android.sdk.notifications.example.StyledNotificationListenerService"
android:exported="false">

<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
Expand Down
6 changes: 4 additions & 2 deletions examples/notifications/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ limitations under the License.
<activity
android:name=".ExampleActivity"
android:label="@string/example_title"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -41,7 +42,8 @@ limitations under the License.

<!-- manually added -->
<service
android:name="com.deltadna.android.sdk.notifications.NotificationListenerService">
android:name="com.deltadna.android.sdk.notifications.NotificationListenerService"
android:exported="false">

<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.deltadna.android
VERSION_NAME=5.0.0
VERSION_NAME=5.0.1

POM_DESCRIPTION=deltaDNA SDK for Android
POM_URL=https://github.com/deltaDNA/android-sdk
Expand Down
Loading

0 comments on commit fdcfcd6

Please sign in to comment.