Skip to content

Commit

Permalink
Build and publish Javadoc to GitHub Pages using Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
filips123 committed Jul 5, 2020
1 parent 559d8f3 commit 57257d7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@ jdk:
- oraclejdk8

script:
- ./gradlew check --info -S --parallel
- ./gradlew check --info -S --parallel

defore_deploy:
- ./gradlew javadoc

deploy:
provider: pages
skip_cleanup: true
keep_history: true
on:
branch: master
github_token: $GITHUB_TOKEN
local_dir: build/docs/javadoc
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ At the heart of Brigadier, you need a `CommandDispatcher<S>`, where `<S>` is any

A command dispatcher holds a "command tree", which is a series of `CommandNode`s that represent the various possible syntax options that form a valid command.

Javadoc of Brigadier API is available on [GitHub Pages](https://mojang.github.io/brigadier/).

## Registering a new command
Before we can start parsing and dispatching commands, we need to build up our command tree. Every registration is an append operation,
so you can freely extend existing commands in a project without needing access to the source code that created them.
Expand Down
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ sourceSets {
}
}

javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
}

artifacts {
archives jar
archives sourcesJar
Expand Down

0 comments on commit 57257d7

Please sign in to comment.