Skip to content

Commit

Permalink
changelog generator [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanWang committed Mar 29, 2017
1 parent d85e259 commit 146e627
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,21 @@ project.ext.VERSION_CODE = VERSION_NAME.replace(".", "") // play it safe; avoid
task clean(type: Delete) {
delete rootProject.buildDir
}

task generateChangelogMd() {
def parsedProjectXml = (new XmlParser()).parse("$project.rootDir/sample/src/main/res/xml/changelog.xml")
def sw = new StringWriter()
sw.append("# Changelog\n")
parsedProjectXml.depthFirst().each {
switch (it.name()) {
case "version":
sw.append("\n## ${it.@title}\n")
break
case "item":
if (it.@text?.trim())
sw.append("* ${it.@text}\n")
}
}
def changelogMd = new File("$project.rootDir/docs/Changelog.md")
changelogMd.write(sw.toString())
}
14 changes: 14 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

## v0.2
* Fixed CheckboxItem blinking
* Added PairItems template
* Add silent refresh listener
* Update dependencies

## v0.1
* Initial
* Added fastadapter support
* Merge animations
* Added abstraction templates
* Added default abstractItems

0 comments on commit 146e627

Please sign in to comment.