Skip to content

Commit

Permalink
Merge pull request #510 from dropbox/rharter/module-structure
Browse files Browse the repository at this point in the history
Restructure modules.
  • Loading branch information
rharter authored Aug 10, 2023
2 parents f4ae190 + c14a9ed commit d96bbd5
Show file tree
Hide file tree
Showing 2,405 changed files with 835 additions and 209 deletions.
13 changes: 8 additions & 5 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 :core: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 :core:apiCheck :android:apiCheck

- name: Dependency Guard
run: ./gradlew dependencyGuard
Expand Down Expand Up @@ -130,18 +130,21 @@ jobs:
with:
name: TestReports
path: |
dropbox-sdk-java/build/reports/
core/build/reports/
android/build/reports/
- name: Upload JavaDocs
uses: actions/upload-artifact@v3
with:
name: JavaDocs
path: |
dropbox-sdk-java/build/docs/javadoc/
core/build/docs/javadoc/
android/build/docs/javadoc/
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: BuildArtifacts
path: |
dropbox-sdk-java/build/distributions/
core/build/distributions/
android/build/distributions/
8 changes: 4 additions & 4 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
[submodule "core/src/main/stone"]
path = core/src/main/stone
url = https://github.com/dropbox/dropbox-api-spec.git
[submodule "dropbox-sdk-java/stone"]
path = dropbox-sdk-java/stone
[submodule "core/stone"]
path = core/stone
url = https://github.com/dropbox/stone.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,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 :core: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
6 changes: 3 additions & 3 deletions dropbox-sdk-android/build.gradle → android/build.gradle
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: ":core", 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 android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID = dropbox-android-sdk
POM_NAME = Dropbox SDK for Android
POM_DESCRIPTION = An Android client library to access Dropbox's HTTP-based Core API v2.
File renamed without changes.
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
Loading

0 comments on commit d96bbd5

Please sign in to comment.