Skip to content

Commit

Permalink
Merge pull request #20 from uploadcare/dev
Browse files Browse the repository at this point in the history
Release 2.0.1
  • Loading branch information
raphaelnew authored Aug 27, 2019
2 parents 1429f45 + 879c655 commit d01576a
Show file tree
Hide file tree
Showing 15 changed files with 291 additions and 94 deletions.
17 changes: 17 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# History

## 2.0.1
- Example:
- Update dependencies.
- Widget:
- Update dependencies
- Fix: use existing UploadcareClient instance instead of creating new one
- Fix: UploadCareWidget.selectFileFrom() didn't work with Camera/Video/File social networks
- Fix: possible issue when Social Source dialog items were not visible in dialog fragment on some devices
- Library:
- Update dependencies
- Add support for batch store/delete calls for Files
- Set default UploadcareClient auth method to HMAC-based
- Fix: "Project" data model, now **UploadcareClient.getProject()** and **UploadcareClient.getProjectAsync()** work properly
- Internal network layer optimizations and improvements


## 2.0.0
- Example: Update dependencies, rewrite example to Kotlin.
- Widget: Update dependencies, rewrite widget to Kotlin, Fixes, Add "Google Photos" support.
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildscript {
def versions = [:]
versions.kotlin_version = '1.3.21'
versions.kotlin_version = '1.3.41'

versions.min_sdk = 22
versions.target_sdk = 28
Expand All @@ -11,14 +11,14 @@ buildscript {
versions.gradle_version = '3.3.2'
versions.bintray_version = '0.9'

versions.core = "1.1.0-alpha05"
versions.material = "1.1.0-alpha05"
versions.core = "1.2.0-alpha03"
versions.material = "1.1.0-alpha09"
versions.navigation = "2.0.0"
versions.safe_args = "2.0.0"
versions.lifecycle = "2.1.0-alpha04"
versions.constraintlayout = "2.0.0-alpha3"
versions.annotation = '1.0.2'
versions.appcompat = "1.1.0-alpha04"
versions.lifecycle = "2.2.0-alpha03"
versions.constraintlayout = "2.0.0-beta1"
versions.annotation = '1.1.0'
versions.appcompat = "1.1.0-rc01"

versions.okhttp = "3.13.1"
versions.retrofit = "2.5.0"
Expand Down
8 changes: 6 additions & 2 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.uploadcare.android.example"
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode 3
versionName "2.0.0"
versionCode 4
versionName "2.0.1"
}

dataBinding {
Expand All @@ -39,6 +39,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.uploadcare.android.library.api.UploadcareFile
import com.uploadcare.android.library.callbacks.UploadcareFilesCallback
import com.uploadcare.android.library.exceptions.UploadcareApiException
import com.uploadcare.android.library.urls.Order
import com.uploadcare.android.widget.controller.UploadcareWidget
import com.uploadcare.android.widget.utils.SingleLiveEvent
import java.net.URI
import java.util.*
Expand All @@ -36,7 +37,7 @@ class FilesViewModel(application: Application) : AndroidViewModel(application) {
/**
* Initialize {@link UploadcareClient}
*/
private val client = UploadcareClient.demoClient() // UploadcareClient("publickey", "privatekey") Use your public and private keys from Uploadcare.com account dashboard.
private val client = UploadcareWidget.getInstance(application).uploadcareClient

fun launchFromPicker() {
launchFromPickerCommand.call()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UploadViewModel(application: Application) : AndroidViewModel(application)
/**
* Initialize {@link UploadcareClient}
*/
private val client = UploadcareClient.demoClient() // UploadcareClient("publickey", "privatekey") Use your public and private keys from Uploadcare.com account dashboard.
private val client = UploadcareWidget.getInstance(application).uploadcareClient

fun launchGetFiles() {
launchGetFilesCommand.call()
Expand Down
2 changes: 1 addition & 1 deletion library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Latest stable version is available from jCenter.
To include it in your Android project, add this to the gradle.build file:

```
implementation 'com.uploadcare.android.library:uploadcare-android:2.0.0'
implementation 'com.uploadcare.android.library:uploadcare-android:2.0.1'
```

Expand Down
10 changes: 7 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
defaultConfig {
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode 7
versionName "2.0.0"
versionCode 8
versionName "2.0.1"
}

androidExtensions {
Expand Down Expand Up @@ -44,6 +44,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}

dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
Expand All @@ -59,7 +63,7 @@ publish {
userOrg = properties.containsKey('bintray.user') ? properties.getProperty("bintray.user") : ""
groupId = 'com.uploadcare.android.library'
artifactId = 'uploadcare-android'
publishVersion = '2.0.0'
publishVersion = '2.0.1'
desc = 'Android client library for the Uploadcare API.'
licences = ["Apache-2.0"]
website = 'https://github.com/uploadcare/uploadcare-android'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.uploadcare.android.library.api

import com.squareup.moshi.Json

/**
* The resource for project, associated with the connecting account.
*/
data class Project(val name: String,
val pubKey: String,
val collaborators: List<Collaborator>) {
@Json(name = "pub_key") val pubKey: String,
val collaborators: List<Collaborator>,
@Json(name = "autostore_enabled") val autostoreEnabled: Boolean = false) {

fun getOwner(): Collaborator? = if (collaborators.isNotEmpty()) {
collaborators[0]
Expand Down
Loading

0 comments on commit d01576a

Please sign in to comment.