Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ buildscript {
classpath files('gradle/dropbox-pem-converter-plugin')
classpath(dropboxJavaSdkLibs.android.gradle.plugin)
classpath(dropboxJavaSdkLibs.kotlin.gradle.plugin)
classpath("com.dropbox.gradle.plugins:stone-java-gradle-plugin")
}
}

Expand Down
69 changes: 65 additions & 4 deletions dropbox-sdk-java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.dropbox.stone.java.model.ClientSpec
import com.dropbox.stone.java.model.StoneConfig

plugins {
id 'java-library'
id "com.github.blindpirate.osgi"
Expand All @@ -7,6 +10,9 @@ plugins {
id "com.dropbox.dependency-guard"
}

dependencyGuard {
configuration("runtimeClasspath")
}

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -239,9 +245,64 @@ dependencyUpdates.resolutionStrategy = {
}
}

apply from: 'stone.gradle'
apply plugin: "com.dropbox.stone.java"

generateStone {
String unusedClassesToGenerate = 'AuthError, PathRoot, PathRootError, AccessError, RateLimitError'
String packageName = 'com.dropbox.core.v2'
String globalRouteFilter = 'alpha_group=null and beta_group=null'
config[
new StoneConfig(
packageName: packageName,
globalRouteFilter: globalRouteFilter,
client: new ClientSpec(
name: 'DbxClientV2Base',
javadoc: 'Base class for user auth clients.',
requestsClassnamePrefix: "DbxUser",
routeFilter: 'auth="user" or auth="noauth" or auth="app, user"',
unusedClassesToGenerate: unusedClassesToGenerate,
),
),
new StoneConfig(
packageName: packageName,
globalRouteFilter: globalRouteFilter,
client: new ClientSpec(
name: 'DbxTeamClientV2Base',
javadoc: 'Base class for team auth clients.',
requestsClassnamePrefix: 'DbxTeam',
routeFilter: 'auth="team"',
),
),
new StoneConfig(
packageName: packageName,
globalRouteFilter: globalRouteFilter,
client: new ClientSpec(
name: 'DbxAppClientV2Base',
javadoc: 'Base class for app auth clients.',
requestsClassnamePrefix: "DbxApp",
routeFilter: 'auth="app" or auth="app, user"',
)
),

]
outputDir "${project.projectDir}/generated_stone_source/main"
}

dependencyGuard {
configuration("runtimeClasspath")
configuration("compileClasspath")
generateTestStone {
String packageName = 'com.dropbox.core.stone'
config[
new StoneConfig(
packageName: packageName,
dataTypesOnly: true,
),
new StoneConfig(
packageName: packageName,
client: new ClientSpec(
name: 'DbxClientV2Base',
javadoc: 'TestClass.',
requestsClassnamePrefix: "DbxTest",
)
),
]
outputDir "${project.projectDir}/generated_stone_source/test"
}
292 changes: 0 additions & 292 deletions dropbox-sdk-java/stone.gradle

This file was deleted.

1 change: 1 addition & 0 deletions examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
classpath "com.android.tools.build:gradle:7.2.1"
classpath files('../gradle/dropbox-pem-converter-plugin')
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath("com.dropbox.gradle.plugins:stone-java-gradle-plugin")
}
}
plugins {
Expand Down
Loading