Skip to content

Commit

Permalink
Add automated docs in Travis CI (#801)
Browse files Browse the repository at this point in the history
* Automated docs

Updates gradle to create docs directory on Travis deployment. Use Travis pages provider to upload the docs directory

* Made some small changes

* Write docs to api folder

Stays consistent with existing format for JS and iOS docs
  • Loading branch information
addisonElliott authored and flovilmart committed Apr 13, 2018
1 parent 01299c9 commit 9b1fde5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build
testData
testCache
server.config
docs/

# Jacoco
jacoco.exec
Expand Down
29 changes: 19 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ before_install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"

script:
- ./gradlew clean testDebugUnitTest jacocoTestReport

after_success:
- ./gradlew coveralls
- codecov
Expand All @@ -26,10 +23,22 @@ cache:
- $HOME/.gradle
- $HOME/.m2/repository

deploy:
provider: script
script: ./gradlew bintrayUpload
skip_cleanup: true
on:
branch: master
tags: true
jobs:
include:
- stage: test
script: ./gradlew clean testDebugUnitTest jacocoTestReport
- stage: release
script: ./gradlew javadocRelease
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: docs/
on:
all_branches: true
- provider: script
script: ./gradlew bintrayUpload
skip_cleanup: true
on:
branch: master
tags: true
1 change: 1 addition & 0 deletions Parse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ android.libraryVariants.all { variant ->

def javadoc = task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
destinationDir = rootProject.file("docs/api")
source = variant.javaCompile.source
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
Expand Down

0 comments on commit 9b1fde5

Please sign in to comment.