Skip to content

Commit 8c52ee5

Browse files
committed
Updates library versions
1 parent 7316df4 commit 8c52ee5

File tree

56 files changed

+400
-322
lines changed

Some content is hidden

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

56 files changed

+400
-322
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Change Log
2+
## [4.12.0](https://github.com/deltaDNA/android-sdk/releases/tag/4.12.0)
3+
## Fixed
4+
- Support for latest versions of firebase cloud messaging added in `library-notifications`.
5+
- Please follow the migration guide to ensure that you populate the new required values for this functionality.
6+
27
## [4.11.4](https://github.com/deltaDNA/android-sdk/releases/tag/4.11.4)
38
### Added
49
- Support for automatically open Link action URLs on an Image Message.

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:4.11.4'
46+
compile 'com.deltadna.android:deltadna-sdk:4.12.0'
4747
```
4848

4949
## 初始化

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Codacy Badge](https://api.codacy.com/project/badge/grade/b5546fd90d3b4b2182961602da6086d8)](https://www.codacy.com/app/deltaDNA/android-sdk)
77
[![Apache2 licensed](https://img.shields.io/badge/license-Apache-blue.svg)](./LICENSE)
88
[![Download](https://api.bintray.com/packages/deltadna/android/deltadna-sdk/images/download.svg)](https://bintray.com/deltadna/android/deltadna-sdk/_latestVersion)
9-
9+
1010
## Contents
1111
* [Overview](#overview)
1212
* [Adding to a project](#adding-to-a-project)
@@ -47,7 +47,7 @@ allprojects {
4747
In your app's build script:
4848
```groovy
4949
dependencies {
50-
implementation 'com.deltadna.android:deltadna-sdk:4.11.4'
50+
implementation 'com.deltadna.android:deltadna-sdk:4.12.0'
5151
}
5252
```
5353
The Java source and target compatibility needs to be set to 1.8 in you app's build script:
@@ -426,7 +426,9 @@ Can be found [here](CHANGELOG.md).
426426
* Version 4.9
427427
* The SDK has been updated to use Java 8 features, as such projects will need to be updated to use 1.8 for the Java source and target compatibility as per the [official documentation](https://developer.android.com/studio/write/java8-support).
428428
* `recordEvent` methods have been changed to to return an `EventAction` object, which can be used for Event-Triggered Campaigns. This means that chaining calls on the `DDNA` SDK instance after calling `recordEvent` is no longer supported.
429-
429+
* [Version 4.12](docs/migrations/4.12.md)
430+
* Critical updates have been made to the Firebase integration in library-notifications. Please follow this guide if you are using push notifications in your project and are updating to this version of the SDK or later.
431+
430432
## License
431433
The sources are available under the Apache 2.0 license.
432434

build.gradle

+21-11
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
buildscript {
1818
ext {
19-
firebaseVersion = '15.0.2'
20-
kotlinVersion = '1.2.71'
19+
firebaseVersion = '20.2.0'
20+
kotlinVersion = '1.3.10'
2121
kotlinxCoroutinesVersion = '0.22.5'
2222
kotsonVersion = '2.5.0'
2323
mockWebServerVersion = '2.7.5'
24-
supportVersion = '26.1.0'
24+
supportVersion = '1.0.0-beta01'
2525
logTagName = 'LOG_TAG'
2626
logTagValue = 'deltaDNA'
2727
}
@@ -33,13 +33,14 @@ buildscript {
3333
}
3434

3535
dependencies {
36-
classpath 'com.android.tools.build:gradle:3.2.1'
37-
classpath('com.dicedmelon.gradle:jacoco-android:0.1.2') {
36+
classpath 'com.android.tools.build:gradle:3.4.2'
37+
classpath('com.dicedmelon.gradle:jacoco-android:0.1.4') {
3838
// https://github.com/arturdm/jacoco-android-gradle-plugin/issues/42
3939
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
4040
}
4141
classpath 'org.jacoco:org.jacoco.core:0.8.1'
4242
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
43+
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
4344
}
4445
}
4546

@@ -53,13 +54,15 @@ allprojects {
5354

5455
subprojects {
5556
def isLibrary = it.name.startsWith('library')
57+
5658

5759
if (isLibrary) {
5860
apply plugin: 'com.android.library'
5961
apply plugin: 'jacoco-android'
6062
} else {
6163
apply plugin: 'com.android.application'
6264
}
65+
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
6366
apply plugin: 'kotlin-android'
6467
apply plugin: 'kotlin-android-extensions'
6568

@@ -70,12 +73,13 @@ subprojects {
7073
}
7174

7275
android {
73-
compileSdkVersion 26
76+
compileSdkVersion 28
7477
buildToolsVersion '28.0.3'
78+
7579

7680
defaultConfig {
77-
minSdkVersion 15
78-
targetSdkVersion 26
81+
minSdkVersion 16
82+
targetSdkVersion 28
7983

8084
versionCode 1
8185
versionName VERSION_NAME
@@ -123,17 +127,23 @@ subprojects {
123127
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
124128
testImplementation 'org.json:json:20171018'
125129
testImplementation 'org.mockito:mockito-core:2.16.0'
126-
testImplementation 'org.robolectric:robolectric:3.8'
130+
testImplementation 'org.robolectric:robolectric:4.0'
127131
}
132+
} else {
133+
dependencies
134+
{
135+
api "androidx.appcompat:appcompat:$supportVersion"
136+
}
137+
128138
}
129139

130140
if (isLibrary) {
131141
apply from: "$rootProject.projectDir/gradle/mvn-push.gradle"
132142
}
133143
}
134144

135-
task wrapper(type: Wrapper) {
136-
gradleVersion = '4.6'
145+
wrapper {
146+
gradleVersion = '4.4'
137147
}
138148

139149
task clean(type: Delete) {

docs/migrations/4.12.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Version 4.12 migration guide
2+
Notifications have been updated to use the latest Firebase Messaging Libraries, which require some additional values to be defined to work with the deltaDNA Platform. Read on to find out how to upgrade from a previous version of the deltaDNA Android SDK.
3+
4+
## Notifications
5+
### Manifest
6+
7+
8+
#### Firebase Configuration Values
9+
In previous versions, the Firebase Cloud Messaging integration required the following `meta-data` entries in the manifest :
10+
```xml
11+
<application ...>
12+
...
13+
14+
<meta-data
15+
android:name="ddna_application_id"
16+
android:resource="@string/application_id"/>
17+
<meta-data
18+
android:name="ddna_sender_id"
19+
android:resource="@string/sender_id"/>
20+
21+
</application>
22+
```
23+
From this version on, the following manifest entries must be defined :
24+
```xml
25+
<application ...>
26+
...
27+
28+
<meta-data
29+
android:name="ddna_application_id"
30+
android:resource="@string/application_id"/>
31+
<meta-data
32+
android:name="ddna_sender_id"
33+
android:resource="@string/sender_id"/>
34+
<meta-data
35+
android:name="ddna_fcm_project_id"
36+
android:resource="@string/fcm_project_id"/>
37+
<meta-data
38+
android:name="ddna_fcm_api_key"
39+
android:resource="@string/fcm_api_key"/>
40+
41+
</application>
42+
```
43+
The values for `ddna_fcm_project_id` and `ddna_fcm_api_key` can be found in your settings menu on the firebase console for the project - they are the `Project ID` and `Web API Key` respectively.
44+
45+
If using Unity then these values should be configured through the Unity Editor menu item.

examples/demo-forget-me/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,4 @@ android {
5050

5151
dependencies {
5252
implementation project(':library')
53-
54-
implementation "com.android.support:appcompat-v7:$supportVersion"
5553
}

examples/demo-forget-me/src/main/java/com/deltadna/android/sdk/example/ExampleActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.deltadna.android.sdk.example;
1818

1919
import android.os.Bundle;
20-
import android.support.v7.app.AppCompatActivity;
20+
import androidx.appcompat.app.AppCompatActivity;
2121
import android.util.Log;
2222
import android.view.View;
2323
import android.widget.TextView;

examples/demo/build.gradle

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ android {
3737
signingConfig signingConfigs.release
3838
}
3939

40-
/*
41-
releaseOptimized {
42-
minifyEnabled true
43-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
44-
45-
signingConfig signingConfigs.release
46-
}
47-
*/
40+
41+
// releaseOptimized {
42+
// minifyEnabled true
43+
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
44+
//
45+
// signingConfig signingConfigs.release
46+
// }
47+
4848
}
4949
}
5050

5151
dependencies {
5252
implementation project(':library')
53-
54-
implementation "com.android.support:appcompat-v7:$supportVersion"
53+
54+
5555
}

examples/demo/src/main/java/com/deltadna/android/sdk/example/ExampleActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import android.app.AlertDialog;
2020
import android.content.Intent;
2121
import android.os.Bundle;
22-
import android.support.v7.app.AppCompatActivity;
22+
import androidx.appcompat.app.AppCompatActivity;
2323
import android.util.Log;
2424
import android.view.View;
2525
import android.widget.EditText;

examples/notifications-style/build.gradle

+9-10
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,19 @@ android {
3737
signingConfig signingConfigs.release
3838
}
3939

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-
//}
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+
// }
4848
}
4949
}
5050

5151
dependencies {
5252
implementation project(':library')
5353
implementation project(':library-notifications')
54-
55-
implementation "com.android.support:appcompat-v7:$supportVersion"
54+
5655
}

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

+4
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@ limitations under the License.
5454
<meta-data
5555
android:name="ddna_sender_id"
5656
android:resource="@string/sender_id"/>
57+
<meta-data android:name="ddna_fcm_project_id"
58+
android:resource="@string/fcm_project_id" />
59+
<meta-data android:name="ddna_fcm_api_key"
60+
android:resource="@string/fcm_api_key" />
5761
</application>
5862
</manifest>

0 commit comments

Comments
 (0)