Skip to content

Commit

Permalink
Removed additional Gradle Root (examples) (#455)
Browse files Browse the repository at this point in the history
* Updated ci jobs.

* Change how integration tests are run.

* Removed unused .gitignore files.

* There is no longer a gradle wrapper in "examples"

* Merging examples into a single module.

* Consolidated Examples

* Disable examples GitHub action.  This can be done in a follow up ticket.  Integration tests cover the majority of this already.

* Fixed logic.
  • Loading branch information
handstandsam authored Sep 28, 2022
1 parent fdacae8 commit d5765ff
Show file tree
Hide file tree
Showing 58 changed files with 229 additions and 500 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ jobs:
- name: Check
run: ./gradlew check

- name: Check Examples
run: cd examples && ./gradlew check

- name: Assemble Examples
run: cd examples && ./gradlew assemble

- name: Run Integration Tests - OkHttpRequestor
run: ./gradlew -Pcom.dropbox.test.httpRequestor=OkHttpRequestor -Pcom.dropbox.test.authInfoFile=../auth_output integrationTest &&
./gradlew -Pcom.dropbox.test.httpRequestor=OkHttpRequestor -Pcom.dropbox.test.authInfoFile=../auth_output proguardTest
Expand Down
102 changes: 51 additions & 51 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
# This workflow will build the project with Gradle and run examples
# Because secrets are not available on external forks, this job is expected to fail
# on external pull requests.

name: Run Examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
examples:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9.10'
- run: python -m pip install ply && pip install six

- name: Grant execute permissions
run: chmod +x gradlew && chmod +x update-submodules
&& chmod +x generate-ci-auth-file && chmod +x scripts/run-examples

- name: Set up submodules
run: ./update-submodules

- name: Obtain access token
env:
APP_KEY: ${{ secrets.APP_KEY }}
APP_SECRET: ${{ secrets.APP_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
run: ./generate-ci-auth-file

- name: Run Examples
run: ./scripts/run-examples $(find `pwd` -name auth_output)
## This workflow will build the project with Gradle and run examples
## Because secrets are not available on external forks, this job is expected to fail
## on external pull requests.
#
#name: Run Examples
#
#on:
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
#
#jobs:
# examples:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
#
# - name: Gradle Wrapper Validation
# uses: gradle/wrapper-validation-action@v1
#
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'zulu'
# - uses: actions/checkout@v2
#
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: '3.9.10'
# - run: python -m pip install ply && pip install six
#
# - name: Grant execute permissions
# run: chmod +x gradlew && chmod +x update-submodules
# && chmod +x generate-ci-auth-file && chmod +x scripts/run-examples
#
# - name: Set up submodules
# run: ./update-submodules
#
# - name: Obtain access token
# env:
# APP_KEY: ${{ secrets.APP_KEY }}
# APP_SECRET: ${{ secrets.APP_SECRET }}
# REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
# run: ./generate-ci-auth-file
#
# - name: Run Examples
# run: ./scripts/run-examples $(find `pwd` -name auth_output)
2 changes: 0 additions & 2 deletions examples/account-info-legacy/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/account-info-legacy/build.gradle

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions examples/account-info/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/account-info/build.gradle

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions examples/authorize-legacy/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions examples/authorize-legacy/build.gradle

This file was deleted.

2 changes: 0 additions & 2 deletions examples/authorize/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/authorize/build.gradle

This file was deleted.

26 changes: 0 additions & 26 deletions examples/build.gradle

This file was deleted.

16 changes: 16 additions & 0 deletions examples/examples/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apply plugin: 'java'
apply plugin: 'kotlin'
apply from: '../../gradle/integration-test-config.gradle'

description = 'Consolidated Examples'

dependencies {
testImplementation 'org.eclipse.jetty.aggregate:jetty-server:8.1.18.v20150929'
testImplementation 'javax.servlet:javax.servlet-api:3.1.0'
testImplementation 'org.apache.commons:commons-lang3:3.4'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.7.9'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.7.4'
testImplementation(dropboxJavaSdkLibs.test.junit)
testImplementation(dropboxJavaSdkLibs.okhttp3)
testImplementation("org.json:json:20220320")
}
Loading

0 comments on commit d5765ff

Please sign in to comment.