Skip to content

Commit

Permalink
Documentation improvements (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirland authored Apr 11, 2019
1 parent c1a19f0 commit 0a3d279
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,34 @@

Android Snapshot Publisher is a Gradle plugin to **prepare and distribute Android Snapshot versions** to multiple distribution sources in a simple and common way.

The main features of the preparation process are:
The main features of the **preparation process** are:
- Update the Android Version Name to keep track of the distributed versions.
The default behavior adds the commit identifier to the Android Version name.
It's very helpful to track possible issues, for example if a crash occurs, you'll want to know in which snapshot version of the app it happened.
- Create and customize rich release notes based on git's history.

This plugin is also meant to easily deploy snapshot builds.
As an example, the following is an automated release note generated by this project.
```text
1.0.1-67a5893: Added pagination in project requests (#150)
Author: Mirland
Last changes:
• Added ripple effect to buttons (#149)
• Change copies in project details screen (#148)
• Add error message when creating a list with the name of an existing one (#147)
• Added filters to organization repositories (#146)
• Import a project automatically after creation (#145)
• Fixed bug that don't delete cards in the db after deleted in the service (#144)
• Fix dashboard view crash and splash screen issue (#143)
• Added languages colors (#142)
• Added progress bar when fetching repositories (#141)
• Added analytics (#140)
• Fix crash that sometimes happened when removing imported projects (#139)
```

This plugin is also meant to easily **deploy** snapshot builds.

Currently the available sources are:
Currently the available services are:
- [Google Play](https://play.google.com/apps/publish/)
- [Fabric Beta](https://docs.fabric.io/apple/beta/overview.html)

Expand Down Expand Up @@ -67,6 +86,8 @@ snapshotPublisher {
}
}
```
The [version](#version-customization) and [releaseNotes](#release-notes) blocks are used to perform the preparation process.
Whereas [fabric](#fabric-beta) and [googlePlay](#google-play) blocks are used to perform the distribution process.

### Version customization
The `version` block allows you to perform version customizations.
Expand Down Expand Up @@ -122,28 +143,31 @@ Last Changes:
The possible variables to play with in this case are:
- `{version}` given by `versionFormat`.
- `{header}` given by `headerFormat`.
- `{commitHistory}` given by `commitHistoryFormat`.
By default it contains information about the most recent commit and their author.
- `{commitHistory}` given by the result of apply `commitHistoryFormat` to a range of commits.
By default the range includes all commits from the last -not current- commit to `maxCommitHistoryLines` commits before that.
If you want to include the last commit in that range, you can set `includeLastCommitInHistory` as `true`.

- `versionFormat`: Specifies the version's variable format.

`{versionName}` (Android app's Version Name) and `{versionCode}` (Android app's Version Code) can be used to create it.

- `headerFormat`: Specifies the header's variable format.
The plugin uses [Git's pretty format] to retrieve the information about the current commit.
If you want to modify it, you may want to use the same tool to do it.
If you want to modify this, you may want to use it.

- `commitHistoryFormat`: Specifies the `{commitHistory}` variable format.
As `headerFormat` does, it uses [Git's pretty format] to create the `commitHistory` for the previous commits.
It includes all commits from the last -not current- commit to `maxCommitHistoryLines` commits before that.

- `maxCommitHistoryLines`: Indicates the number of commits included in `{commitHistory}`.

- `outputFile`: The file where the release notes will be saved.
By default this value is `null` and that means the release notes will be generated and delivered with the snapshot build but it will not be saved in the local storage.
If you want to save the release notes in the local storage, you can set `outputFile = file("release-notes.txt")`.
By default this value is `null` and that means the release notes will be generated and delivered with the snapshot build but it will not be saved in the file system.
If you want to save the release notes in the file system, you can set `outputFile = file("release-notes.txt")`.
You can define it using a relative path (where the start point is the Android application module folder) or an absolute path.

- `includeLastCommitInHistory`: Flag to include the most recent commit in `{commitHistory}`.
By default this value is `false` because it's used in `{header}`.
By default this value is `false` because it's used in `{header}`

- `includeMergeCommitsInHistory`: Flag to include merge commits in `{commitHistory}`.

Expand Down

0 comments on commit 0a3d279

Please sign in to comment.