Skip to content

Commit

Permalink
Moves modules to match new artifact structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
rharter committed Aug 9, 2023
1 parent 1737bd8 commit a2e990d
Show file tree
Hide file tree
Showing 2,406 changed files with 837 additions and 207 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: ./update-submodules

- name: Generate Stone
run: ./gradlew :dropbox-sdk-java:generateStone
run: ./gradlew :dropbox:generateStone

- name: Ensure no changes in Generated Code
run: ./scripts/check-clean-git-status
Expand All @@ -54,7 +54,7 @@ jobs:
run: ./generate-ci-auth-file

- name: Ensure Binary Compatibility
run: ./gradlew :dropbox-sdk-java:apiCheck
run: ./gradlew :dropbox:apiCheck :dropbox-android:apiCheck

- name: Dependency Guard
run: ./gradlew dependencyGuard
Expand Down
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "dropbox-sdk-java/src/main/stone"]
path = dropbox-sdk-java/src/main/stone
url = https://github.com/dropbox/dropbox-api-spec.git
[submodule "dropbox-sdk-java/stone"]
path = dropbox-sdk-java/stone
[submodule "dropbox/stone"]
path = dropbox/stone
url = https://github.com/dropbox/stone.git
[submodule "dropbox/src/main/stone"]
path = dropbox/src/main/stone
url = https://github.com/dropbox/dropbox-api-spec.git
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dropbox Core SDK for Java

![GitHub](https://img.shields.io/github/license/dropbox/dropbox-sdk-java)
![Maven Central](https://img.shields.io/maven-central/v/com.dropbox.core/dropbox-core-sdk)
![Maven Central](https://img.shields.io/maven-central/v/com.dropbox.core/dropbox)
![GitHub Release Date](https://img.shields.io/github/release-date/dropbox/dropbox-sdk-java)

A Java library to access [Dropbox's HTTP-based Core API v2](https://www.dropbox.com/developers/documentation/http/documentation). This SDK also supports the older [Core API v1](https://www.dropbox.com/developers-v1/core/docs), but that support will be removed at some point.
Expand All @@ -23,7 +23,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
```xml
<dependency>
<groupId>com.dropbox.core</groupId>
<artifactId>dropbox-core-sdk</artifactId>
<artifactId>dropbox</artifactId>
<version>5.4.5</version>
</dependency>
```
Expand All @@ -33,12 +33,22 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
```groovy
dependencies {
// ...
implementation 'com.dropbox.core:dropbox-core-sdk:5.4.5'
implementation 'com.dropbox.core:dropbox:5.4.5'
}
```

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.

### Android

For Android projects we have a specific dependency, `dropbox-android`, which can be included.

```kotlin
dependencies {
implementation("com.dropbox.core:dropbox-android:6.0.0-SNAPSHOT")
}
```

## Dropbox for Java tutorial

A good way to start using the Java SDK is to follow this quick tutorial. Just make sure you have the Java SDK [installed](#setup) first!
Expand Down Expand Up @@ -359,7 +369,7 @@ As a workaround, you can build your own version of the JAR that omits the "osgi.

```shell
./gradlew clean
./gradlew -Posgi.bnd.noee=true :dropbox-sdk-java:jar
./gradlew -Posgi.bnd.noee=true :dropbox:jar
```

(This is equivalent to passing the "-noee" option to the OSGi "bnd" tool.)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public final class com/dropbox/core/android/Auth {
public static final fun getDbxCredential ()Lcom/dropbox/core/oauth/DbxCredential;
public static final fun getOAuth2Token ()Ljava/lang/String;
public static final fun getScope ()Ljava/lang/String;
public static final fun getUid ()Ljava/lang/String;
public static final fun startOAuth2Authentication (Landroid/content/Context;Ljava/lang/String;)V
public static final fun startOAuth2Authentication (Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
public static final fun startOAuth2Authentication (Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
Expand Down Expand Up @@ -35,6 +36,7 @@ public class com/dropbox/core/android/AuthActivity : android/app/Activity {
public static final field ACTION_AUTHENTICATE_V2 Ljava/lang/String;
public static final field AUTH_PATH_CONNECT Ljava/lang/String;
public static final field AUTH_VERSION I
public static final field Companion Lcom/dropbox/core/android/AuthActivity$Companion;
public static field result Landroid/content/Intent;
public fun <init> ()V
public static final fun checkAppBeforeAuth (Landroid/content/Context;Ljava/lang/String;Z)Z
Expand All @@ -47,6 +49,16 @@ public class com/dropbox/core/android/AuthActivity : android/app/Activity {
public static final fun setSecurityProvider (Lcom/dropbox/core/android/AuthActivity$SecurityProvider;)V
}

public final class com/dropbox/core/android/AuthActivity$Companion {
public final fun checkAppBeforeAuth (Landroid/content/Context;Ljava/lang/String;Z)Z
public final fun makeIntent (Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
public final fun makeIntent (Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
public final fun setAuthParams (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
public final fun setAuthParams (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
public final fun setAuthParams (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public final fun setSecurityProvider (Lcom/dropbox/core/android/AuthActivity$SecurityProvider;)V
}

public abstract interface class com/dropbox/core/android/AuthActivity$SecurityProvider {
public abstract fun getSecureRandom ()Ljava/security/SecureRandom;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id "org.jetbrains.kotlinx.binary-compatibility-validator"
alias(dropboxJavaSdkLibs.plugins.maven.publish.plugin)
alias(dropboxJavaSdkLibs.plugins.gradle.version.plugin)
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
alias(dropboxJavaSdkLibs.plugins.dependency.guard)
}

Expand All @@ -20,7 +20,7 @@ android {
}

dependencies {
api(project(path: ":dropbox-sdk-java", configuration: "withoutOsgi"))
api(project(path: ":dropbox", configuration: "withoutOsgi"))
}

dependencyGuard {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
com.fasterxml.jackson.core:jackson-core:2.7.9
ch.randelshofer:fastdoubleparser:0.8.0
com.fasterxml.jackson.core:jackson-core:2.15.0
com.fasterxml.jackson:jackson-bom:2.15.0
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
Expand Down
3 changes: 3 additions & 0 deletions dropbox-android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID = dropbox-android
POM_NAME = Dropbox SDK for Android
POM_DESCRIPTION = An Android library to access Dropbox's HTTP-based Core API v2.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public open class AuthActivity : Activity() {
* See:
* https://developer.android.com/reference/android/app/Activity#onTopResumedActivityChanged(boolean)
*/
fun onTopResumedActivityChanged(onTop: Boolean) {
override fun onTopResumedActivityChanged(onTop: Boolean) {
if (isFinishing || !onTop) {
return
}
Expand Down Expand Up @@ -302,23 +302,23 @@ public open class AuthActivity : Activity() {
* The Android action which the official Dropbox app will accept to
* authenticate a user. You won't ever have to use this.
*/
const val ACTION_AUTHENTICATE_V1: String = "com.dropbox.android.AUTHENTICATE_V1"
public const val ACTION_AUTHENTICATE_V1: String = "com.dropbox.android.AUTHENTICATE_V1"

/**
* The Android action which the official Dropbox app will accept to
* authenticate a user. You won't ever have to use this.
*/
const val ACTION_AUTHENTICATE_V2: String = "com.dropbox.android.AUTHENTICATE_V2"
public const val ACTION_AUTHENTICATE_V2: String = "com.dropbox.android.AUTHENTICATE_V2"

/**
* The version of the API for the web-auth callback with token (not the initial auth request).
*/
const val AUTH_VERSION: Int = 1
public const val AUTH_VERSION: Int = 1

/**
* The path for a successful callback with token (not the initial auth request).
*/
const val AUTH_PATH_CONNECT: String = "/connect"
public const val AUTH_PATH_CONNECT: String = "/connect"

// Class-level state used to replace the default SecureRandom implementation
// if desired.
Expand Down
2 changes: 0 additions & 2 deletions dropbox-sdk-android/gradle.properties

This file was deleted.

2 changes: 0 additions & 2 deletions dropbox-sdk-java/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion dropbox-sdk-java/src/main/stone
Submodule stone deleted from c36ba2
1 change: 0 additions & 1 deletion dropbox-sdk-java/stone
Submodule stone deleted from 02feff
Loading

0 comments on commit a2e990d

Please sign in to comment.