Skip to content

Commit e152079

Browse files
handstandsamJay Palacio
andauthored
5.4.2 Release & README Updates (#464)
* start changelog * Prepare for release 5.4.0 * 5.4.2 * Prepare for release 5.4.2 * Prepare for release 5.4.2 Co-authored-by: Jay Palacio <[email protected]>
1 parent 009c8eb commit e152079

File tree

7 files changed

+57
-23
lines changed

7 files changed

+57
-23
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ intellij/
1212
*.iml
1313
local.properties
1414

15-
# Output file when rendering ReadMe.md locally.
15+
# Output file when rendering README.md locally.
1616
/ReadMe.html
1717

1818
# editor temp files

ChangeLog.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
## 5.3.0 (2022-07-20) [Milestone](https://github.com/dropbox/dropbox-sdk-java/milestone/1?closed=1)
1+
## 5.4.2 (2022-10-03)
2+
---------------------------------------------
3+
- Update dropbox-api-spec to point to more recent version (Sept 01, 2022) [#431](https://github.com/dropbox/dropbox-sdk-java/pull/431)
4+
- Generated stone api code is now checked into repository for greater visibility of spec changes [#418](https://github.com/dropbox/dropbox-sdk-java/pull/418)
5+
- Renamed `master` -> `main` [#424](https://github.com/dropbox/dropbox-sdk-java/pull/424)
6+
- Added gradle version catalog [#414](https://github.com/dropbox/dropbox-sdk-java/pull/414)[#436](https://github.com/dropbox/dropbox-sdk-java/pull/436)
7+
- Moved android code from `dropbox-sdk-java` into `dropbox-sdk-android` [#429](https://github.com/dropbox/dropbox-sdk-java/pull/429)
8+
- Converted Java code to Kotlin in `dropbox-sdk-android` while mostly maintaining binary compatibility. [#430](https://github.com/dropbox/dropbox-sdk-java/pull/430)
9+
- Binary Compatibility Changes since `v5.3.0`[#449](https://github.com/dropbox/dropbox-sdk-java/pull/449) ([see changes](https://github.com/dropbox/dropbox-sdk-java/pull/441/commits/fd9b0a56152d72cd8310c849dbbe42ee239ff371?diff=unified&w=0)):
10+
- The following classes are now `final` and cannot be extended.
11+
- `com.dropbox.core.android.Auth`
12+
- `com.dropbox.core.android.DbxOfficialAppConnector`
13+
- In `com.dropbox.core.android.AuthActivity`, constants for the Intent Extra Keys were moved to `com.dropbox.core.android.internal.DropboxAuthIntent`
14+
- Fixed NPE bug in login flow [#347](https://github.com/dropbox/dropbox-sdk-java/issues/347)
15+
16+
5.4.1 (2022-09-27)
17+
---------------------------------------------
18+
- Republished 5.3.0 due to premature release of 5.4.0
19+
20+
5.4.0 (2022-09-26)
21+
---------------------------------------------
22+
- Published prematurely due to misconfiguration of GH Action, do not use.
23+
24+
5.3.0 (2022-07-20) [Milestone](https://github.com/dropbox/dropbox-sdk-java/milestone/1?closed=1)
225
---------------------------------------------
326
- Update dropbox-api-spec to point to more recent version (July 13, 2022) [#400](https://github.com/dropbox/dropbox-sdk-java/pull/400)
427
- The generateStone Gradle Task now supports Gradle Configuration Caching [#390](https://github.com/dropbox/dropbox-sdk-java/pull/390)

ReadMe.md renamed to README.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# ⚠️ Please use version `5.3.0` or `5.4.1` (These versions are identical). Version `5.4.0` was published prematurely due to a scripting misconfiguration. A follow up release is actively being worked on and will be released during this week (September 27th-30th). Thank you! ⚠️
2-
31
# Dropbox Core SDK for Java
42

53
![GitHub](https://img.shields.io/github/license/dropbox/dropbox-sdk-java)
@@ -10,7 +8,7 @@ A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.
108

119
License: [MIT](License.txt)
1210

13-
Documentation: [Javadocs](https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.3.0/)
11+
Documentation: [Javadocs](https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.2/)
1412

1513
## Setup
1614

@@ -26,7 +24,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
2624
<dependency>
2725
<groupId>com.dropbox.core</groupId>
2826
<artifactId>dropbox-core-sdk</artifactId>
29-
<version>5.3.0</version>
27+
<version>5.4.2</version>
3028
</dependency>
3129
```
3230

@@ -35,7 +33,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
3533
```groovy
3634
dependencies {
3735
// ...
38-
implementation 'com.dropbox.core:dropbox-core-sdk:5.3.0'
36+
implementation 'com.dropbox.core:dropbox-core-sdk:5.4.2'
3937
}
4038
```
4139

@@ -161,9 +159,8 @@ public class Main {
161159

162160
Some more complete examples can be found here:
163161

164-
* Example for a simple web app: [Web File Browser example](examples/web-file-browser/src/main/java/com/dropbox/core/examples/web_file_browser/DropboxAuth.java)
162+
* Example for a simple web app: [Web File Browser example](examples/examples/src/main/java/com/dropbox/core/examples/web_file_browser/DropboxAuth.java)
165163
* Example for an Android app written in Kotlin: [Android Kotlin Example](examples/android)
166-
* Example for a command-line tool: [Command-Line Authorization example](examples/authorize/src/main/java/com/dropbox/core/examples/authorize/Main.java)
167164

168165
To try out running these examples, please follow the instructions below.
169166

@@ -265,20 +262,36 @@ To run individual tests, use the `--tests` gradle test filter:
265262
./gradlew -Pcom.dropbox.test.authInfoFile=<path-to-test.auth> integrationTest --tests '*.DbxClientV1IT.testAccountInfo'
266263
```
267264

268-
## Android 11 Updates
265+
## Usage on Android
266+
267+
Android support *** CALL OUT METHODS USED TO AUTHENTICATE ***
269268

270-
In the event you are using the Android-specific code in this library (i.e. the code in `com.dropbox.core.android` package), you will need to add some code to your `AndroidManifest.xml` when you bump your target SDK version to 30. If your app does not use this code, you can ignore this section.
269+
### Required Dependencies For Android
270+
The Android code in this SDK is written in Kotlin and is now a runtime dependency. If you do not already have Kotlin in your project, you will need to add `implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.21")` to your dependencies block.
271271

272-
When targeting/running on Android 11 (targetSdk 30 in your app's `build.gradle`), the Android OS will restrict what installed apps your app can query for through the `PackageManager`. Since the android code in this library queries for the official Dropbox app, those restrictions will affect your app when you target SDK 30. In particular, if you don't declare that your app queries for the official Dropbox app, then you will see crashes when you hit the code that talks to the official Dropbox app.
272+
The last published version without Kotlin is `5.3.0`. All future Android code will be written in Kotlin.
273273

274-
To resolve the issue, add the following to your `AndroidManifest.xml`
274+
### `AndroidManifest.xml`
275275

276+
The following two entries may need to be added to your `AndroidManifest.xml` depending on your target SDK level.
277+
278+
For SDK levels >= `30`
276279
```xml
277280
<queries>
278281
<package android:name="com.dropbox.android" />
279282
</queries>
280283
```
281284

285+
For SDK levels >= `33`
286+
287+
See [#406](https://github.com/dropbox/dropbox-sdk-java/issues/406) for context
288+
```xml
289+
<intent-filter>
290+
<action android:name="android.intent.action.VIEW" />
291+
<category android:name="android.intent.category.DEFAULT" />
292+
</intent-filter>
293+
```
294+
282295
We are working on pulling out this Android-specific code into its own android library with an `AndroidManifest.xml` that can be merged with your existing manifest, but in the meantime, this will work.
283296

284297
## FAQ
@@ -292,7 +305,7 @@ Example in Gradle:
292305
```gradle
293306
dependencies {
294307
// ...
295-
api 'com.squareup.okhttp3:okhttp:3.11.0'
308+
api 'com.squareup.okhttp3:okhttp:4.0.0'
296309
}
297310
```
298311

@@ -301,16 +314,16 @@ dependencies {
301314
The JAR's manifest has the following line:
302315

303316
```
304-
Require-Capability: osgi.ee;filter="(&(osgi.ee=JavaSE)(version=1.6))"
317+
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
305318
```
306319

307-
OSGi containers running on Java 1.6 or above should provide this capability. Unfortunately, some OSGi containers don't do this correctly and will reject the bundle JAR in the OSGi subsystem context.
320+
Most OSGi containers should provide this capability. Unfortunately, some OSGi containers don't do this correctly and will reject the bundle JAR in the OSGi subsystem context.
308321

309322
As a workaround, you can build your own version of the JAR that omits the "osgi.ee" capability by running:
310323

311324
```shell
312325
./gradlew clean
313-
./gradlew -Posgi.bnd.noee=true jar
326+
./gradlew -Posgi.bnd.noee=true :dropbox-sdk-java:jar
314327
```
315328

316329
(This is equivalent to passing the "-noee" option to the OSGi "bnd" tool.)
@@ -334,5 +347,3 @@ Versions 2.0.0-2.0.3 of this SDK require SDK-specific ProGuard rules when shrink
334347
-dontwarn javax.servlet.**
335348
-dontwarn org.apache.**
336349
```
337-
338-
**IMPORTANT: If you are running version 2.0.x before 2.0.3, you should update to the latest Dropbox SDK version to avoid a deserialization bug that can cause Android apps that use ProGuard to crash.**

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Releasing
44
1. Update the top level [gradle.properties](gradle.properties) to a non-SNAPSHOT version.
55
2. Update [DbxSdkVersion.java](DbxSdkVersion.java) to a non-SNAPSHOT version.
66
3. Update the [ChangeLog.md](ChangeLog.md) for the impending release.
7-
4. Update the [ReadMe.md](ReadMe.md) with the new version.
7+
4. Update the [README.md](README.md) with the new version.
88
5. `git commit -am "Prepare for release X.Y.Z"` (where X.Y.Z is the new version)
99
6. `git tag -a vX.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
1010
* Run `git tag` to verify it

dropbox-sdk-java/src/main/java/com/dropbox/core/DbxSdkVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public class DbxSdkVersion
1212
// https://github.com/dropbox/dropbox-sdk-java/issues/357
1313
private static String loadVersion()
1414
{
15-
return "5.4.2-SNAPSHOT";
15+
return "5.4.2";
1616
}
1717
}

examples/android/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Prerequisites: Apache Maven (to build the SDK), [Android Studio](http://develope
1313
1. Download this repository.
1414
2. Build the SDK: run `./gradlew build` in the SDK root directory (two levels up from this folder).
1515
3. In Android Studio, choose "Import Project" and select this folder.
16-
4. Edit local.properties and add `DROPBOX_APP_KEY=YOUR_KEY_HERE` with your Dropbox API key ([how to get a Dropbox API key](../../ReadMe.md#get-a-dropbox-api-key)).
16+
4. Edit local.properties and add `DROPBOX_APP_KEY=YOUR_KEY_HERE` with your Dropbox API key ([how to get a Dropbox API key](../../README.md#get-a-dropbox-api-key)).
1717
5. Build and run.
1818

1919
If you don't have Android Studio, you can use the command-line:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# POM
22
GROUP = com.dropbox.core
3-
VERSION_NAME=5.4.2-SNAPSHOT
3+
VERSION_NAME=5.4.2
44

55
POM_NAME = Dropbox SDK Java
66
POM_DESCRIPTION = A Java library to access Dropbox's HTTP-based Core API v2.

0 commit comments

Comments
 (0)