Skip to content

Commit 62ecab9

Browse files
authored
Add nullability annotations to ParseCloud (#1008)
1 parent 03758ec commit 62ecab9

File tree

5 files changed

+75
-11
lines changed

5 files changed

+75
-11
lines changed

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Changelog
2+
3+
### master
4+
5+
- Update OkHttp version to allow for future Android API 30 compilation
6+
- Compile with Android 29
7+
- Update Facebook Login dependency to 6.1.0
8+
- Add nullability annotations to `ParseCloud`
9+
10+
### 1.23.1
11+
- Correction to OkHttp version thanks to @mtrezza
12+
13+
### 1.23.0
14+
- Add Google login/signup support
15+
- Move Facebook and Twitter libraries to be modules within this library
16+
- Update Facebook login to use AndroidX
17+
- Add ability to update the server without having to reinitialize the client thanks to @mtrezza
18+
19+
### 1.22.1
20+
Re-releasing since Jitpack failed. Same as 1.22.0
21+
22+
### 1.22.0
23+
- Expose client destroy
24+
- Enhancement to ParseQuery kt operations
25+
26+
### 1.21.0
27+
- Add coroutines support module
28+
- Fix bug in save user in batch
29+
30+
### 1.20.0
31+
- Fix fetchAllIfNeeded and fetchAllIfNeededInBackground limit #939
32+
- Expose useful constants #930
33+
- ParseQuery extensions #929
34+
- Change to non-deprecated methods for FCM #927. If you are using FCM and updating to 1.20.0, be sure to take a look at the FCM README for the updated steps on usage.
35+
36+
### 1.19.0
37+
- SDK now uses AndroidX and API 28
38+
- Kotlin Delegates
39+
- Fix StackOverflowError when merging ParseObject from JSON #896
40+
41+
### 1.18.5
42+
- Fix for issue #886
43+
44+
### 1.18.4
45+
- Fix issue with returning { "result": null } in cloud function (deserialized as JSONObject instead of null)
46+
- Remove deprecated methods in ParseAnalytics and ParsePush
47+
- Add findAll() method to ParseQuery which iterates and finds all ParseObjects for a query (no limit)
48+
49+
### 1.18.3
50+
- Add ktx module and dependency, which adds some Kotlin extensions for easier Parse SDK usage.
51+
52+
### 1.18.2
53+
- More things made public for LiveQuery support
54+
55+
### 1.18.1
56+
- Make things public for LiveQuery support
57+
58+
### 1.18.0
59+
- Annotate ParseObject with nullability thanks to @kurtisnelson and @Jawnnypoo
60+
- Remove deprecated refresh() method from ParseObject
61+
- Partial string match thanks to @rogerhu
62+
- Fix delete, save eventually, and findAllPinned issues thanks to @dangtz

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath "com.android.tools.build:gradle:3.5.3"
8+
classpath "com.android.tools.build:gradle:3.6.0"
99
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3"
1010
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
}
1313
}
1414

1515
plugins {
16-
id "com.github.ben-manes.versions" version "0.27.0"
16+
id "com.github.ben-manes.versions" version "0.28.0"
1717
}
1818

1919
allprojects {
@@ -28,8 +28,8 @@ task clean(type: Delete) {
2828
}
2929

3030
ext {
31-
compileSdkVersion = 28
31+
compileSdkVersion = 29
3232

3333
minSdkVersion = 14
34-
targetSdkVersion = 28
34+
targetSdkVersion = 29
3535
}

facebook/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020
}
2121

2222
dependencies {
23-
api "com.facebook.android:facebook-login:5.11.2"
23+
api "com.facebook.android:facebook-login:6.1.0"
2424
implementation project(":parse")
2525

2626
testImplementation "junit:junit:4.13"

parse/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android {
2929

3030
ext {
3131
// Note: Don't update past 3.12.x, as it sets the minSdk to Android 5.0
32-
okhttpVersion = "3.12.8"
32+
okhttpVersion = "3.12.9"
3333
}
3434

3535
dependencies {

parse/src/main/java/com/parse/ParseCloud.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
*/
99
package com.parse;
1010

11+
import androidx.annotation.NonNull;
12+
1113
import java.util.List;
1214
import java.util.Map;
1315

@@ -57,8 +59,8 @@ static ParseCloudCodeController getCloudCodeController() {
5759
* be placed in a ParseObject except for ParseObjects themselves.
5860
* @return A Task that will be resolved when the cloud function has returned.
5961
*/
60-
public static <T> Task<T> callFunctionInBackground(final String name,
61-
final Map<String, ?> params) {
62+
public static <T> Task<T> callFunctionInBackground(@NonNull final String name,
63+
@NonNull final Map<String, ?> params) {
6264
return ParseUser.getCurrentSessionTokenAsync().onSuccessTask(new Continuation<String, Task<T>>() {
6365
@Override
6466
public Task<T> then(Task<String> task) {
@@ -79,7 +81,7 @@ public Task<T> then(Task<String> task) {
7981
* ParseObject.
8082
* @throws ParseException exception
8183
*/
82-
public static <T> T callFunction(String name, Map<String, ?> params) throws ParseException {
84+
public static <T> T callFunction(@NonNull String name, @NonNull Map<String, ?> params) throws ParseException {
8385
return ParseTaskUtils.wait(ParseCloud.<T>callFunctionInBackground(name, params));
8486
}
8587

@@ -91,8 +93,8 @@ public static <T> T callFunction(String name, Map<String, ?> params) throws Pars
9193
* be placed in a ParseObject except for ParseObjects themselves.
9294
* @param callback The callback that will be called when the cloud function has returned.
9395
*/
94-
public static <T> void callFunctionInBackground(String name, Map<String, ?> params,
95-
FunctionCallback<T> callback) {
96+
public static <T> void callFunctionInBackground(@NonNull String name, @NonNull Map<String, ?> params,
97+
@NonNull FunctionCallback<T> callback) {
9698
ParseTaskUtils.callbackOnMainThreadAsync(
9799
ParseCloud.<T>callFunctionInBackground(name, params),
98100
callback);

0 commit comments

Comments
 (0)