Skip to content

Commit

Permalink
ChangeLog/ReadMe: Update for 2.1.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Rieb committed Jul 29, 2016
1 parent c49275e commit 6aea7a4
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 171 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ intellij/
.idea/
*.iml
gradle.properties
local.properties

# Output file when rendering ReadMe.md locally.
/ReadMe.html
Expand Down
22 changes: 18 additions & 4 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
2.0.8
2.1.0 (2016-07-29)
---------------------------------------------
- Update to latest API specs:
- Files
- Add uploadSessionFinishBatch(..) endpoint for batch uploads.
- Sharing:
- Add changeFileMemberAccess(..) for changing a member's access to a shared file.
- Add INVITE_VIEWER_NO_COMMENT and SHARE_LINK to FolderAction.
- Add MemberAction.MAKE_VIEWER_NO_COMMENT.
- Add preview URL to SharedFolderMetadata.
- Add parent folder access information to MemberAccessLevelResult.
- Add AddFolderMemberError.TOO_MANY_INVITEES.
- Add AddMemberSelectorError.AUTOMATIC_GROUP.
- Add MountFolderError.INSUFFICIENT_QUOTA.
- Team:
- Add TeamMemberStatus.Tag.REMOVED.
- Add ability to update group management type for a group.
- Add ability to include removed members when listing members of a team.
- Add membersRecover(..) endpoint for recovering team members.
- Fix OkHttpRequestor/OkHttp3Requestor to support interceptors that consume request bodies, like Stetho.
- Fix does not apply to streaming uploads.
- Fix OkHttpRequestor/OkHttp3Requestor to properly handle streaming uploads.
- The requestors no longer buffer entire request body in memory for streams.

2.0.7 (2016-06-20)
---------------------------------------------
- Add configureRequest(..) method for simpler subclassing of OkHttpRequestor and OkHttp3Requestor.
- Fix BadRequest error when adding custom state to a DbxWebAuth.Request object.
- Remove final modifier from DbxClientV2 and DbxTeamClientV2 class declarations for easier mocking in tests.
Expand Down
8 changes: 4 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.

License: [MIT](License.txt)

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

## Setup

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

Expand All @@ -23,7 +23,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
```groovy
dependencies {
// ...
compile 'com.dropbox.core:dropbox-core-sdk:2.0.6'
compile 'com.dropbox.core:dropbox-core-sdk:2.1.0'
}
```

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

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.
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.

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.

Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ task integrationTest(type: Test) {
useTestNG()

// TestNG specific options
options.parallel 'classes'
options.threadCount 4
options.preserveOrder true

// only select integration tests (similar to maven-failsafe-plugin rules)
Expand Down
4 changes: 3 additions & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ subprojects {
standardInput = System.in
classpath = sourceSets.main.runtimeClasspath
main = "com.dropbox.core.examples.${project.name.replace('-','_')}.Main"
ignoreExitValue true

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

def failOnError = project.properties.get('failOnError', 'false') == 'true'
ignoreExitValue !failOnError

def argi = 0
while (true) {
def prop = "arg${argi}"
Expand Down
19 changes: 16 additions & 3 deletions examples/run
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,23 @@ if [ $# -eq 0 ]; then
fi

declare -a project_properties
if [ "${1}" == '--use-auth-prop' ] ; then
project_properties+=("-PuseAuthInfoFileProp=true")
while [[ $# -gt 0 ]]; do
case "${1}" in
--use-auth-prop)
project_properties+=("-PuseAuthInfoFileProp=true")
;;
--fail-on-error)
project_properties+=("-PfailOnError=true")
;;
--*)
die "unrecognized argument: ${1}"
;;
*)
break
;;
esac
shift
fi
done

example_name="$1" ; shift
example_name="$(echo "$example_name" | sed 's|/*$||')"
Expand Down
24 changes: 24 additions & 0 deletions release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,34 @@ distributions {
}
}

/**
* Verify our SDK version is set correctly in our artifact before uploading. This is to protect
* against any silly mistakes.
*/
def verifySdkVersion(deployment) {
deployment.mainArtifact.file.withInputStream { stream ->
def jar = new java.util.jar.JarInputStream(stream)
def entry = jar.getNextJarEntry()
while (entry != null) {
if (entry.getName().equals("sdk-version.txt")) {
def version = jar.text.trim();
if (!(version ==~ /\d+\.\d+\.\d+/)) {
throw new GradleException("SDK version not in semantic versioning format: " + version);
}
return
}
entry = jar.getNextJarEntry()
}

throw new GradleException("Could not find sdk-version.txt in artifact: " + deployment.mainArtifact.file.absolutePath);
}
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { deployment ->
verifySdkVersion(deployment)
signing.signPom(deployment)
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/export-generated
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def main():
"""The entry point for the program."""

args = _cmdline_parser.parse_args()
cwd = os.path.dirname(__file__)
cwd = os.path.dirname(os.path.dirname(__file__))
repo_path = args.repo_path
def log(msg):
if args.verbose:
Expand Down
42 changes: 22 additions & 20 deletions scripts/release-check
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ die() {
}

# Exit immediately on any error.
set -eufo pipefail
set -euf
trap die SIGTERM

DIR=`dirname "${BASE_SOURCE[0]}"`
DIR=`dirname $(dirname "${BASH_SOURCE[0]}")`

run() {
echo "================================================================================"
Expand All @@ -20,26 +20,19 @@ run() {
}

gradle() {
run "${DIR}/gradlew" \
-b "${DIR}/build.gradle" \
-c "${DIR}/standalone-settings.gradle" \
"$@"
(cd "${DIR}" && run ./gradlew -c standalone-settings.gradle "$@")
}

examples_gradle() {
run "${DIR}/examples/gradlew" \
-b "${DIR}/examples/build.gradle" \
"$@"
(cd "${DIR}/examples" && run ./gradlew "$@")
}

android_gradle() {
run "${DIR}/examples/android/gradlew" \
-b "${DIR}/examples/android/build.gradle" \
"$@"
(cd "${DIR}/examples/android" && run ./gradlew "$@")
}

run_example() {
run "${DIR}/examples/run" "$@"
(cd "${DIR}/examples" && run ./run --fail-on-error "$@")
}

if [ $# -ne 1 ] ; then
Expand All @@ -55,6 +48,12 @@ if [ ! -f "${AUTH_FILE}" ] ; then
exit 1
fi

tempfile=$(mktemp -t `basename "${BASH_SOURCE[0]}"`.XXXXXXXXXX)
function cleanup() {
[ ! -e "${tempfile}" ] || rm -f "${tempfile}"
}
trap cleanup EXIT

echo "Running release checks..."
echo ""
echo "A series of tests will be performed to verify package is ready for release."
Expand All @@ -64,21 +63,24 @@ echo ""
gradle clean
gradle check

# test major HTTP requestor implementations
for requestor in "StandardHttpRequestor" "OkHttpRequestor" "OkHttp3Requestor" ; do
gradle -Pcom.dropbox.test.httpRequestor="${requestor}" integrationTest proguardTest
done

# prepare examples to be run
gradle install
examples_gradle clean
examples_gradle classes

# run examples
run_example account-info "${AUTH_FILE}"
run_example upload-file "${AUTH_FILE}" <(cat /dev/urandom | head -c 1024) /test/dropbox-sdk-java/examples/upload-file/small-1KiB.dat
run_example upload-file "${AUTH_FILE}" <(cat /dev/urandom | head -c $(( 32 << 20 ))) /test/dropbox-sdk-java/examples/upload-file/large-32MiB.dat
cat /dev/urandom | head -c 1024 > "${tempfile}"
run_example upload-file "${AUTH_FILE}" "${tempfile}" /test/dropbox-sdk-java/examples/upload-file/small-1KiB.dat
cat /dev/urandom | head -c $(( 32 << 20 )) > "${tempfile}"
run_example upload-file "${AUTH_FILE}" "${tempfile}" /test/dropbox-sdk-java/examples/upload-file/large-32MiB.dat

# build android
android_gradle clean
android_gradle assemble

# Run integration tests against major HTTP requestor implementations
for requestor in "StandardHttpRequestor" "OkHttpRequestor" "OkHttp3Requestor" ; do
gradle -Pcom.dropbox.test.httpRequestor="${requestor}" integrationTest proguardTest
done

Loading

0 comments on commit 6aea7a4

Please sign in to comment.