Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a branch based on master. This can have any name you deem fit e.g travis-deploy-javadoc

  2. Add a gradle task in the project build file for generating javadocs in the project’s build.gradle file as shown here

    • For a library make sure this gradle task is placed on the library’s build.gradle file and not the sample app’s build.gradle file.

  3. In the travis.yml file add a command for generating the javadocs as shown here on line 53 and 54. This goes in the script section

  4. In the travis.yml file add a github pages provider which will deploy the javadocs to the github pages branch as shown here on line 58 to 64 . The special note of the following variables :-

    1. local_dir

      • This variable specifies the location where the generated javadocs are found in the project structure

    2. branch

      • The branch on which the deployment will be triggered on when a git push is done. Branch created on step 1 e.g

      travis-deploy-javadoc . This will be changed later to master

  5. In the travis.yml file add the encrypted github access token to the global env section as shown here

  6. Push these changes. After a successful build the generated javadocs should be published on http://smartregister.org/{project repo name}

  7. After confirming that the javadocs have been published, change the deploy branch to master as shown here . This is done so as to ensure that publishing of the javadocs is only done after changes are merged to master.

...