Skip to content

Commit d01576a

Browse files
authored
Merge pull request #20 from uploadcare/dev
Release 2.0.1
2 parents 1429f45 + 879c655 commit d01576a

File tree

15 files changed

+291
-94
lines changed

15 files changed

+291
-94
lines changed

HISTORY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# History
2+
3+
## 2.0.1
4+
- Example:
5+
- Update dependencies.
6+
- Widget:
7+
- Update dependencies
8+
- Fix: use existing UploadcareClient instance instead of creating new one
9+
- Fix: UploadCareWidget.selectFileFrom() didn't work with Camera/Video/File social networks
10+
- Fix: possible issue when Social Source dialog items were not visible in dialog fragment on some devices
11+
- Library:
12+
- Update dependencies
13+
- Add support for batch store/delete calls for Files
14+
- Set default UploadcareClient auth method to HMAC-based
15+
- Fix: "Project" data model, now **UploadcareClient.getProject()** and **UploadcareClient.getProjectAsync()** work properly
16+
- Internal network layer optimizations and improvements
17+
18+
219
## 2.0.0
320
- Example: Update dependencies, rewrite example to Kotlin.
421
- Widget: Update dependencies, rewrite widget to Kotlin, Fixes, Add "Google Photos" support.

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
buildscript {
44
def versions = [:]
5-
versions.kotlin_version = '1.3.21'
5+
versions.kotlin_version = '1.3.41'
66

77
versions.min_sdk = 22
88
versions.target_sdk = 28
@@ -11,14 +11,14 @@ buildscript {
1111
versions.gradle_version = '3.3.2'
1212
versions.bintray_version = '0.9'
1313

14-
versions.core = "1.1.0-alpha05"
15-
versions.material = "1.1.0-alpha05"
14+
versions.core = "1.2.0-alpha03"
15+
versions.material = "1.1.0-alpha09"
1616
versions.navigation = "2.0.0"
1717
versions.safe_args = "2.0.0"
18-
versions.lifecycle = "2.1.0-alpha04"
19-
versions.constraintlayout = "2.0.0-alpha3"
20-
versions.annotation = '1.0.2'
21-
versions.appcompat = "1.1.0-alpha04"
18+
versions.lifecycle = "2.2.0-alpha03"
19+
versions.constraintlayout = "2.0.0-beta1"
20+
versions.annotation = '1.1.0'
21+
versions.appcompat = "1.1.0-rc01"
2222

2323
versions.okhttp = "3.13.1"
2424
versions.retrofit = "2.5.0"

example/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
applicationId "com.uploadcare.android.example"
1212
minSdkVersion versions.min_sdk
1313
targetSdkVersion versions.target_sdk
14-
versionCode 3
15-
versionName "2.0.0"
14+
versionCode 4
15+
versionName "2.0.1"
1616
}
1717

1818
dataBinding {
@@ -39,6 +39,10 @@ android {
3939
sourceCompatibility JavaVersion.VERSION_1_8
4040
targetCompatibility JavaVersion.VERSION_1_8
4141
}
42+
43+
kotlinOptions {
44+
jvmTarget = "1.8"
45+
}
4246
}
4347

4448
dependencies {

example/src/main/java/com/uploadcare/android/example/viewmodels/FilesViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.uploadcare.android.library.api.UploadcareFile
1111
import com.uploadcare.android.library.callbacks.UploadcareFilesCallback
1212
import com.uploadcare.android.library.exceptions.UploadcareApiException
1313
import com.uploadcare.android.library.urls.Order
14+
import com.uploadcare.android.widget.controller.UploadcareWidget
1415
import com.uploadcare.android.widget.utils.SingleLiveEvent
1516
import java.net.URI
1617
import java.util.*
@@ -36,7 +37,7 @@ class FilesViewModel(application: Application) : AndroidViewModel(application) {
3637
/**
3738
* Initialize {@link UploadcareClient}
3839
*/
39-
private val client = UploadcareClient.demoClient() // UploadcareClient("publickey", "privatekey") Use your public and private keys from Uploadcare.com account dashboard.
40+
private val client = UploadcareWidget.getInstance(application).uploadcareClient
4041

4142
fun launchFromPicker() {
4243
launchFromPickerCommand.call()

example/src/main/java/com/uploadcare/android/example/viewmodels/UploadViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class UploadViewModel(application: Application) : AndroidViewModel(application)
3737
/**
3838
* Initialize {@link UploadcareClient}
3939
*/
40-
private val client = UploadcareClient.demoClient() // UploadcareClient("publickey", "privatekey") Use your public and private keys from Uploadcare.com account dashboard.
40+
private val client = UploadcareWidget.getInstance(application).uploadcareClient
4141

4242
fun launchGetFiles() {
4343
launchGetFilesCommand.call()

library/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Latest stable version is available from jCenter.
2222
To include it in your Android project, add this to the gradle.build file:
2323

2424
```
25-
implementation 'com.uploadcare.android.library:uploadcare-android:2.0.0'
25+
implementation 'com.uploadcare.android.library:uploadcare-android:2.0.1'
2626
2727
```
2828

library/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
defaultConfig {
1212
minSdkVersion versions.min_sdk
1313
targetSdkVersion versions.target_sdk
14-
versionCode 7
15-
versionName "2.0.0"
14+
versionCode 8
15+
versionName "2.0.1"
1616
}
1717

1818
androidExtensions {
@@ -44,6 +44,10 @@ android {
4444
targetCompatibility JavaVersion.VERSION_1_8
4545
}
4646

47+
kotlinOptions {
48+
jvmTarget = "1.8"
49+
}
50+
4751
dokka {
4852
outputFormat = 'html'
4953
outputDirectory = "$buildDir/javadoc"
@@ -59,7 +63,7 @@ publish {
5963
userOrg = properties.containsKey('bintray.user') ? properties.getProperty("bintray.user") : ""
6064
groupId = 'com.uploadcare.android.library'
6165
artifactId = 'uploadcare-android'
62-
publishVersion = '2.0.0'
66+
publishVersion = '2.0.1'
6367
desc = 'Android client library for the Uploadcare API.'
6468
licences = ["Apache-2.0"]
6569
website = 'https://github.com/uploadcare/uploadcare-android'

library/src/main/java/com/uploadcare/android/library/api/Project.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package com.uploadcare.android.library.api
22

3+
import com.squareup.moshi.Json
4+
35
/**
46
* The resource for project, associated with the connecting account.
57
*/
68
data class Project(val name: String,
7-
val pubKey: String,
8-
val collaborators: List<Collaborator>) {
9+
@Json(name = "pub_key") val pubKey: String,
10+
val collaborators: List<Collaborator>,
11+
@Json(name = "autostore_enabled") val autostoreEnabled: Boolean = false) {
912

1013
fun getOwner(): Collaborator? = if (collaborators.isNotEmpty()) {
1114
collaborators[0]

0 commit comments

Comments
 (0)