Skip to content

Commit 9b1fde5

Browse files
addisonElliottflovilmart
authored andcommitted
Add automated docs in Travis CI (#801)
* 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
1 parent 01299c9 commit 9b1fde5

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ build
3434
testData
3535
testCache
3636
server.config
37+
docs/
3738

3839
# Jacoco
3940
jacoco.exec

.travis.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ before_install:
1313
- mkdir "$ANDROID_HOME/licenses" || true
1414
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
1515

16-
script:
17-
- ./gradlew clean testDebugUnitTest jacocoTestReport
18-
1916
after_success:
2017
- ./gradlew coveralls
2118
- codecov
@@ -26,10 +23,22 @@ cache:
2623
- $HOME/.gradle
2724
- $HOME/.m2/repository
2825

29-
deploy:
30-
provider: script
31-
script: ./gradlew bintrayUpload
32-
skip_cleanup: true
33-
on:
34-
branch: master
35-
tags: true
26+
jobs:
27+
include:
28+
- stage: test
29+
script: ./gradlew clean testDebugUnitTest jacocoTestReport
30+
- stage: release
31+
script: ./gradlew javadocRelease
32+
deploy:
33+
- provider: pages
34+
skip_cleanup: true
35+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
36+
local_dir: docs/
37+
on:
38+
all_branches: true
39+
- provider: script
40+
script: ./gradlew bintrayUpload
41+
skip_cleanup: true
42+
on:
43+
branch: master
44+
tags: true

Parse/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ android.libraryVariants.all { variant ->
6969

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

0 commit comments

Comments
 (0)