Skip to content

Commit 99a0c78

Browse files
committed
5.0.1
1 parent a850654 commit 99a0c78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+540
-657
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: Build with Gradle
2121
run: ./gradlew build
2222
- name: Publish package
23-
run: ./gradlew uploadArchives
23+
run: ./gradlew publishReleasePublicationToGithubRepository
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [5.0.1](https://github.com/deltaDNA/android-sdk/releases/tag/5.0.1)
4+
5+
## Fixed
6+
- When switching environments between Dev and Live, data will be cleaned so that events are not sent to the wrong environment during testing
7+
- Notifications will launch and open correctly on the latest version of Android
8+
39
## [5.0.0](https://github.com/deltaDNA/android-sdk/releases/tag/5.0.0)
410

511
## New

README-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ allprojects {
4343
```
4444
在你APP的构建脚本
4545
```groovy
46-
compile 'com.deltadna.android:deltadna-sdk:5.0.0'
46+
compile 'com.deltadna.android:deltadna-sdk:5.0.1'
4747
```
4848

4949
## 初始化

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ allprojects {
4949
In your app's build script:
5050
```groovy
5151
dependencies {
52-
implementation 'com.deltadna.android:deltadna-sdk:5.0.0'
52+
implementation 'com.deltadna.android:deltadna-sdk:5.0.1'
5353
}
5454
```
5555
The Java source and target compatibility needs to be set to 1.8 in you app's build script:
@@ -69,6 +69,9 @@ The SDK needs to be initialised with the following parameters in an `Application
6969
* `collectUrl`, this is the address of the server that will be collecting your events.
7070
* `engageUrl`, this is the address of the server that will provide real-time A/B Testing and Targeting.
7171

72+
> 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
73+
> to the wrong environment.
74+
7275
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
7376
be done before the SDK will send any events or make any engage requests.
7477

build.gradle

+27-48
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
buildscript {
1818
ext {
1919
firebaseVersion = '20.2.0'
20-
kotlinVersion = '1.3.10'
21-
kotlinxCoroutinesVersion = '0.22.5'
20+
kotlinVersion = '1.6.10'
21+
kotlinxCoroutinesVersion = '1.3.9'
2222
kotsonVersion = '2.5.0'
2323
mockWebServerVersion = '2.7.5'
2424
supportVersion = '1.0.0-beta01'
@@ -27,46 +27,43 @@ buildscript {
2727
}
2828

2929
repositories {
30-
jcenter()
3130
google()
3231
maven { url 'https://plugins.gradle.org/m2/' }
32+
mavenCentral()
3333
}
3434

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

4744
allprojects {
4845
repositories {
4946
google()
50-
maven { url 'https://maven.google.com' }
51-
jcenter()
47+
mavenCentral()
48+
}
49+
def isLibrary = it.name.startsWith('library')
50+
51+
if (isLibrary) {
52+
apply plugin: 'maven-publish'
5253
}
53-
apply plugin: 'maven-publish'
5454
}
5555

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

59-
6059
if (isLibrary) {
6160
apply plugin: 'com.android.library'
62-
apply plugin: 'jacoco-android'
6361
} else {
6462
apply plugin: 'com.android.application'
6563
}
6664
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
6765
apply plugin: 'kotlin-android'
6866
apply plugin: 'kotlin-android-extensions'
69-
7067

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

7774
android {
78-
compileSdkVersion 28
75+
compileSdkVersion 31
7976
buildToolsVersion '28.0.3'
8077

78+
lintOptions {
79+
abortOnError false
80+
}
8181

8282
defaultConfig {
8383
minSdkVersion 16
84-
targetSdkVersion 28
84+
targetSdkVersion 31
8585

8686
versionCode 1
8787
versionName VERSION_NAME
8888

8989
buildConfigField('String', logTagName, "\"$logTagValue\"")
90+
buildConfigField('String', "VERSION_NAME", "\"$VERSION_NAME\"")
9091

9192
if (isLibrary) {
9293
archivesBaseName = "${POM_ARTIFACT_ID}-${versionName}.${System.getenv("BUILD_NUMBER") ?: getSha()}"
@@ -106,12 +107,6 @@ subprojects {
106107
includeAndroidResources = true
107108
}
108109
}
109-
110-
buildTypes {
111-
debug {
112-
testCoverageEnabled true
113-
}
114-
}
115110
}
116111
}
117112

@@ -121,43 +116,27 @@ subprojects {
121116
testImplementation 'com.google.truth:truth:0.42'
122117
testImplementation 'com.nhaarman:mockito-kotlin:1.5.0'
123118
testImplementation "com.squareup.okhttp:mockwebserver:$mockWebServerVersion"
124-
testImplementation 'junit:junit:4.12'
119+
testImplementation 'junit:junit:4.13.2'
125120
testImplementation 'nl.jqno.equalsverifier:equalsverifier:2.3.3'
126121
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
127122
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
128123
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
129-
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
130-
testImplementation 'org.json:json:20171018'
131-
testImplementation 'org.mockito:mockito-core:2.16.0'
132-
testImplementation 'org.robolectric:robolectric:4.0'
124+
testImplementation 'org.json:json:20180813'
125+
testImplementation 'org.mockito:mockito-core:4.2.0'
126+
testImplementation 'org.robolectric:robolectric:4.7.3'
127+
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
133128
}
134129
} else {
135-
dependencies
136-
{
137-
api "androidx.appcompat:appcompat:$supportVersion"
138-
}
139-
140-
}
141-
142-
if (isLibrary) {
143-
apply from: "$rootProject.projectDir/gradle/mvn-push.gradle"
130+
dependencies {
131+
api "androidx.appcompat:appcompat:$supportVersion"
132+
}
144133
}
145134
}
146135

147-
wrapper {
148-
gradleVersion = '4.4'
149-
}
150-
151136
task clean(type: Delete) {
152137
delete rootProject.buildDir
153138
}
154139

155-
tasks.whenTaskAdded { task ->
156-
if(task.name.contains("Test") || task.name.contains("test")) {
157-
task.enabled = false
158-
}
159-
}
160-
161140
static def getSha() {
162141
return 'git rev-parse --short HEAD'.execute().text.trim()
163142
}

examples/demo-forget-me/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ limitations under the License.
3131
<activity
3232
android:name=".ExampleActivity"
3333
android:label="@string/app_name"
34-
android:launchMode="singleTask">
34+
android:launchMode="singleTask"
35+
android:exported="true">
3536

3637
<intent-filter>
3738
<action android:name="android.intent.action.MAIN"/>

examples/demo/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ limitations under the License.
3131
<activity
3232
android:name=".ExampleActivity"
3333
android:label="@string/app_name"
34-
android:launchMode="singleTask">
34+
android:launchMode="singleTask"
35+
android:exported="true">
3536

3637
<intent-filter>
3738
<action android:name="android.intent.action.MAIN"/>

examples/notifications-style/build.gradle

-9
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ android {
3636

3737
signingConfig signingConfigs.release
3838
}
39-
40-
// // https://code.google.com/p/android/issues/detail?id=187483
41-
// // none of the suggested workarounds work so will need to wait for a fix
42-
// releaseOptimized {
43-
// minifyEnabled true
44-
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
45-
//
46-
// signingConfig signingConfigs.release
47-
// }
4839
}
4940
}
5041

examples/notifications-style/src/main/AndroidManifest.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ limitations under the License.
3131
<activity
3232
android:name=".ExampleActivity"
3333
android:label="@string/example_title"
34-
android:launchMode="singleTask">
34+
android:launchMode="singleTask"
35+
android:exported="true">
3536

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

4243
<!-- manually added -->
4344
<service
44-
android:name="com.deltadna.android.sdk.notifications.example.StyledNotificationListenerService">
45+
android:name="com.deltadna.android.sdk.notifications.example.StyledNotificationListenerService"
46+
android:exported="false">
4547

4648
<intent-filter>
4749
<action android:name="com.google.firebase.MESSAGING_EVENT"/>

examples/notifications/src/main/AndroidManifest.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ limitations under the License.
3131
<activity
3232
android:name=".ExampleActivity"
3333
android:label="@string/example_title"
34-
android:launchMode="singleTask">
34+
android:launchMode="singleTask"
35+
android:exported="true">
3536

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

4243
<!-- manually added -->
4344
<service
44-
android:name="com.deltadna.android.sdk.notifications.NotificationListenerService">
45+
android:name="com.deltadna.android.sdk.notifications.NotificationListenerService"
46+
android:exported="false">
4547

4648
<intent-filter>
4749
<action android:name="com.google.firebase.MESSAGING_EVENT"/>

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.deltadna.android
2-
VERSION_NAME=5.0.0
2+
VERSION_NAME=5.0.1
33

44
POM_DESCRIPTION=deltaDNA SDK for Android
55
POM_URL=https://github.com/deltaDNA/android-sdk

0 commit comments

Comments
 (0)