Skip to content

Commit af7a43e

Browse files
author
Karl Rieb
committed
2.1.0 release.
1 parent 81804e8 commit af7a43e

File tree

168 files changed

+7073
-6414
lines changed

Some content is hidden

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

168 files changed

+7073
-6414
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ intellij/
1010
.idea/
1111
*.iml
1212
gradle.properties
13+
local.properties
1314

1415
# Output file when rendering ReadMe.md locally.
1516
/ReadMe.html
1617

1718
# editor temp files
18-
*~
19+
*~
20+
21+
# pyc files from generator
22+
*.pyc

ChangeLog.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
2.1.0 (2016-07-29)
2+
---------------------------------------------
3+
- Update to latest API specs:
4+
- Files
5+
- Add uploadSessionFinishBatch(..) endpoint for batch uploads.
6+
- Sharing:
7+
- Add changeFileMemberAccess(..) for changing a member's access to a shared file.
8+
- Add INVITE_VIEWER_NO_COMMENT and SHARE_LINK to FolderAction.
9+
- Add MemberAction.MAKE_VIEWER_NO_COMMENT.
10+
- Add preview URL to SharedFolderMetadata.
11+
- Add parent folder access information to MemberAccessLevelResult.
12+
- Add AddFolderMemberError.TOO_MANY_INVITEES.
13+
- Add AddMemberSelectorError.AUTOMATIC_GROUP.
14+
- Add MountFolderError.INSUFFICIENT_QUOTA.
15+
- Team:
16+
- Add TeamMemberStatus.Tag.REMOVED.
17+
- Add ability to update group management type for a group.
18+
- Add ability to include removed members when listing members of a team.
19+
- Add membersRecover(..) endpoint for recovering team members.
20+
- Fix OkHttpRequestor/OkHttp3Requestor to support interceptors that consume request bodies, like Stetho.
21+
- Fix does not apply to streaming uploads.
22+
- Fix OkHttpRequestor/OkHttp3Requestor to properly handle streaming uploads.
23+
- The requestors no longer buffer entire request body in memory for streams.
24+
- Add configureRequest(..) method for simpler subclassing of OkHttpRequestor and OkHttp3Requestor.
25+
- Fix BadRequest error when adding custom state to a DbxWebAuth.Request object.
26+
- Remove final modifier from DbxClientV2 and DbxTeamClientV2 class declarations for easier mocking in tests.
27+
128
2.0.6 (2016-06-20)
229
---------------------------------------------
330
- Update to latest API specs:

ReadMe.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.
44

55
License: [MIT](License.txt)
66

7-
[Javadoc.](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/)
7+
[Javadoc.](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.1.x/)
88

99
## Setup
1010

@@ -14,7 +14,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
1414
<dependency>
1515
<groupId>com.dropbox.core</groupId>
1616
<artifactId>dropbox-core-sdk</artifactId>
17-
<version>2.0.6</version>
17+
<version>2.1.0</version>
1818
</dependency>
1919
```
2020

@@ -23,11 +23,11 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
2323
```groovy
2424
dependencies {
2525
// ...
26-
compile 'com.dropbox.core:dropbox-core-sdk:2.0.6'
26+
compile 'com.dropbox.core:dropbox-core-sdk:2.1.0'
2727
}
2828
```
2929

30-
You can also download the Java SDK JAR and and its dependencies directly from the [latest release page](https://github.com/dropbox/dropbox-sdk-java/releases/latest).
30+
You can also download the Java SDK JAR and and its required dependencies directly from the [latest release page](https://github.com/dropbox/dropbox-sdk-java/releases/latest). Note that the distribution artifacts on the releases pages do not contain optional dependencies.
3131

3232
## Get a Dropbox API key
3333

@@ -52,7 +52,7 @@ Before your app can access a Dropbox user's files, the user must authorize your
5252
* Example for an Android app: [Android example](examples/android/src/main/java/com/dropbox/core/examples/android/UserActivity.java)
5353
* Example for a command-line tool: [Command-Line Authorization example](examples/authorize/src/main/java/com/dropbox/core/examples/authorize/Main.java)
5454

55-
Once you have an access token, create a [`DbxClientV2`](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.0.x/com/dropbox/core/v2/DbxClientV2.html) and start making API calls.
55+
Once you have an access token, create a [`DbxClientV2`](https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.1.x/com/dropbox/core/v2/DbxClientV2.html) and start making API calls.
5656

5757
You only need to perform the authorization process once per user. Once you have an access token for a user, save it somewhere persistent, like in a database. The next time that user visits your app's, you can skip the authorization process and go straight to creating a `DbxClientV2` and making API calls.
5858

@@ -158,9 +158,10 @@ Another workaround is to tell your OSGi container to provide that requirement: [
158158

159159
### Does this SDK require any special ProGuard rules for shrink optimizations?
160160

161-
Versions 2.0.0-2.0.3 of this SDK require specific ProGuard rules to work with shrinking enabled. However, since version **2.0.4**, the SDK no longer needs special ProGuard directives. However, you may want to consider adding "-dontwarn" directives for unused optional dependencies:
161+
Versions 2.0.0-2.0.3 of this SDK require SDK-specific ProGuard rules when shrinking is enabled. However, since version **2.0.4**, the only ProGuard rules necessary are for the SDK's required and optional dependencies. If you encounter ProGuard warnings, consider adding the following "-dontwarn" directives to your ProGuard configuration file:
162162

163163
```
164+
-dontwarn okio.**
164165
-dontwarn okhttp3.**
165166
-dontwarn com.squareup.okhttp.**
166167
-dontwarn com.google.appengine.**

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ dependencies {
9090
testCompile 'com.google.appengine:appengine-testing:1.9.38'
9191
testCompile 'com.squareup.okhttp:okhttp:2.7.5'
9292
testCompile 'com.squareup.okhttp3:okhttp:3.3.1'
93+
testCompile 'com.google.guava:guava:19.0'
9394
}
9495

9596
processResources {
@@ -109,8 +110,7 @@ test {
109110
useTestNG()
110111

111112
// TestNG specific options
112-
options.parallel 'classesAndMethods'
113-
options.preserveOrder true
113+
options.parallel 'methods'
114114
options.threadCount 4
115115

116116
// exclude integration tests
@@ -153,6 +153,8 @@ task integrationTest(type: Test) {
153153
useTestNG()
154154

155155
// TestNG specific options
156+
options.parallel 'classes'
157+
options.threadCount 4
156158
options.preserveOrder true
157159

158160
// only select integration tests (similar to maven-failsafe-plugin rules)

examples/android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ dependencies {
6161
compile 'com.android.support:appcompat-v7:23.1.1'
6262
compile 'com.android.support:design:23.1.1'
6363
compile 'com.android.support:recyclerview-v7:23.1.1'
64-
compile 'com.fasterxml.jackson.core:jackson-core:2.7.4'
6564
// picasso 2.5.2 doesn't have OkHttp3 support (although it exists
6665
// on master). Must use OkHttp v2 and v3 until new picasso release
6766
compile 'com.squareup.picasso:picasso:2.5.2'

examples/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ subprojects {
3939
standardInput = System.in
4040
classpath = sourceSets.main.runtimeClasspath
4141
main = "com.dropbox.core.examples.${project.name.replace('-','_')}.Main"
42-
ignoreExitValue true
4342

4443
// convenience for not having to always specify the auth file
4544
def useAuthInfoFileProp = project.properties.get('useAuthInfoFileProp', 'false') == 'true'
4645
if (useAuthInfoFileProp && project.hasProperty('com.dropbox.test.authInfoFile')) {
4746
args project.property('com.dropbox.test.authInfoFile')
4847
}
4948

49+
def failOnError = project.properties.get('failOnError', 'false') == 'true'
50+
ignoreExitValue !failOnError
51+
5052
def argi = 0
5153
while (true) {
5254
def prop = "arg${argi}"

examples/run

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,23 @@ if [ $# -eq 0 ]; then
3838
fi
3939

4040
declare -a project_properties
41-
if [ "${1}" == '--use-auth-prop' ] ; then
42-
project_properties+=("-PuseAuthInfoFileProp=true")
41+
while [[ $# -gt 0 ]]; do
42+
case "${1}" in
43+
--use-auth-prop)
44+
project_properties+=("-PuseAuthInfoFileProp=true")
45+
;;
46+
--fail-on-error)
47+
project_properties+=("-PfailOnError=true")
48+
;;
49+
--*)
50+
die "unrecognized argument: ${1}"
51+
;;
52+
*)
53+
break
54+
;;
55+
esac
4356
shift
44-
fi
57+
done
4558

4659
example_name="$1" ; shift
4760
example_name="$(echo "$example_name" | sed 's|/*$||')"

settings.gradle

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/java/com/dropbox/core/DbxAuthFinish.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ public String getUserId() {
6666
return urlState;
6767
}
6868

69+
/**
70+
* State is not returned from /oauth2/token call, so we must
71+
* append it after the JSON parsing.
72+
*
73+
* @param urlState Custom state passed into /oauth2/authorize
74+
*/
75+
DbxAuthFinish withUrlState(/*@Nullable*/ String urlState) {
76+
if (this.urlState != null) {
77+
throw new IllegalStateException("Already have URL state.");
78+
}
79+
return new DbxAuthFinish(accessToken, userId, urlState);
80+
}
81+
6982
/**
7083
* For JSON parsing.
7184
*/

src/main/java/com/dropbox/core/DbxHost.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public final class DbxHost {
2323
* and "www.dropbox.com"
2424
*/
2525
public static final DbxHost DEFAULT = new DbxHost(
26-
"api.dropbox.com",
27-
"api-content.dropbox.com",
26+
"api.dropboxapi.com",
27+
"content.dropboxapi.com",
2828
"www.dropbox.com",
29-
"api-notify.dropbox.com"
29+
"notify.dropboxapi.com"
3030
);
3131

3232
private final String api;

0 commit comments

Comments
 (0)