{"id":13493386,"url":"https://github.com/MFlisar/changelog","last_synced_at":"2025-03-28T11:32:40.787Z","repository":{"id":51096154,"uuid":"124038869","full_name":"MFlisar/changelog","owner":"MFlisar","description":"Changelog library - builder setup and advanced filtering","archived":false,"fork":false,"pushed_at":"2023-10-25T11:30:56.000Z","size":1469,"stargazers_count":78,"open_issues_count":2,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-31T07:34:18.614Z","etag":null,"topics":["android","changelog","changelog-activity","changelog-dialog"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MFlisar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-06T07:31:25.000Z","updated_at":"2024-09-03T12:53:19.000Z","dependencies_parsed_at":"2024-01-16T10:08:39.924Z","dependency_job_id":null,"html_url":"https://github.com/MFlisar/changelog","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFlisar%2Fchangelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFlisar%2Fchangelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFlisar%2Fchangelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MFlisar%2Fchangelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MFlisar","download_url":"https://codeload.github.com/MFlisar/changelog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246021402,"owners_count":20710930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","changelog","changelog-activity","changelog-dialog"],"created_at":"2024-07-31T19:01:14.737Z","updated_at":"2025-03-28T11:32:40.432Z","avatar_url":"https://github.com/MFlisar.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"### Changelog [![Release](https://jitpack.io/v/MFlisar/changelog.svg)](https://jitpack.io/#MFlisar/changelog)\n\nThis is a simple builder based changelog library that shows a changelog in a `RecyclerView`, a `RecyclerView` dialog or a `RecyclerView` activity with following features:\n\n**Features**\n* filtering\n  * based on a min version (useful for app start to only show new changelog entries)\n  * based on a custom filter string (useful for filtering changelog based on build flavour)\n* builder supports any in layout `RecyclerView` or provides a ready to use `Dialog` or `Activity`\n* also supports automatic handling of showing changelogs on app start (uses preference to save last seen changelog version and handles everything for you automatically to only show **new changelogs** and only show those once)\n* shows loading progress in `Dialog` or `Activity` while parsing changelog\n* customise look\n  * optional bullet lists\n  * custom and automatic version names (e.g. version 100 will be formatted as \"v1.00\" by default if no custom version name is provided)\n  * fully **customised layouts** via a custom renderer\n  * **custom xml tags** + **custom rendering** of them\n  * automatic and **custom sorting**\n* supports raw and xml resources, default resource name is `changelog.xml` in raw folder\n* supports an optional rate app button\n* supports summaries with a \"show more\" button\n\n**Examples - activity, dialog, automatically sorted activity, custom layout**\n\n![Changelog activity](https://github.com/MFlisar/changelog/blob/master/images/activity.png)\n![Changelog dialog](https://github.com/MFlisar/changelog/blob/master/images/dialog.png)\n![Changelog dialog-sorted](https://github.com/MFlisar/changelog/blob/master/images/activity-sorted.png)\n![Changelog custom](https://github.com/MFlisar/changelog/blob/master/images/custom.png)\n![Changelog custom](https://github.com/MFlisar/changelog/blob/master/images/summary.png)\n\n### Compose version\n\nYou can find a **compose version** here: [ComposeChangelog](https://github.com/MFlisar/ComposeChangelog)\n\nIt does have some improvements like it won't show empty changelogs, it does use coroutines to load data, its even more modular and code was cleaned.\n \n### Gradle (via [JitPack.io](https://jitpack.io/))\n\n1. add jitpack to your project's `build.gradle`:\n```groovy\nrepositories {\n    maven { url \"https://jitpack.io\" }\n}\n```\n2. add the compile statement to your module's `build.gradle`:\n```groovy\ndependencies {\n    compile 'com.github.MFlisar:changelog:NEWEST-VERSION'\n}\n```\n\nNEWEST-VERSION: [![Release](https://jitpack.io/v/MFlisar/changelog.svg)](https://jitpack.io/#MFlisar/changelog)\n\n### Demo\n\nJust check out the [demo activity](https://github.com/MFlisar/changelog/blob/master/demo/src/main/java/com/michaelflisar/changelog/demo/MainActivity.java), it will show the base usage of the builder and it's settings.\n\n### Simple usage example\n\nYou must add a `changelog.xml` to your raw resource files. Then you can use it like following:\n\n```java\nChangelogBuilder builder = new ChangelogBuilder()\n\t.withUseBulletList(bulletList) // true if you want to show bullets before each changelog row, false otherwise\n\t.withMinVersionToShow(110)     // provide a number and the log will only show changelog rows for versions equal or higher than this number\n\t.withFilter(new ChangelogFilter(ChangelogFilter.Mode.Exact, \"somefilterstring\", true)) // this will filter out all tags, that do not have the provided filter attribute\n\t.withManagedShowOnStart(true)  // library will take care to show activity/dialog only if the changelog has new infos and will only show this new infos\n\t.withRateButton(true) // enable this to show a \"rate app\" button in the dialog =\u003e clicking it will open the play store; the parent activity or target fragment can also implement IChangelogRateHandler to handle the button click\n\t.withSummary(true, true) // enable this to show a summary and a \"show more\" button, the second paramter describes if releases without summary items should be shown expanded or not\n\t.withVersionNameFormatter(new DefaultAutoVersionNameFormatter(DefaultAutoVersionNameFormatter.Type.MajorMinor, \"b\")) // Will format a version 100 like \"1.0b\", default is without the b\n\t.withTitle(\"Some custom title\") // provide a custom title if desired, default one is \"Changelog \u003cVERSION\u003e\"\n\t.withOkButtonLabel(\"Back\") // provide a custom ok button text if desired, default one is \"OK\"\n\t.withRateButtonLabel(\"Wanna rate?\") // provide a custom rate button text if desired, default one is \"Rate\"\n\t.buildAndShowDialog(activity, false); // second parameter defines, if the dialog has a dark or light theme\n\t\n\t// Check advanced usage section for more\n```\n\n### Example `changelog.xml`\n\n```xml\n\u003cchangelog\u003e\n\n\t\u003c!-- simple example - no version name =\u003e will be generated based on verionCode: 100 =\u003e v1.00 --\u003e\n\t\u003crelease versionCode=\"120\" versionName=\"v1.2\" date=\"2018-03-04\"\u003e\n\t\t\u003cinfo\u003eSome info\u003c/info\u003e\n\t\t\u003cnew type=\"summary\"\u003eSome improvement\u003c/new\u003e\n\t\t\u003cbugfix\u003eSome bugfix\u003c/bugfix\u003e\n\t\u003c/release\u003e\n\t\n\t\u003c!-- simple example - no filter --\u003e\n\t\u003crelease versionCode=\"120\" versionName=\"v1.2\" date=\"2018-03-04\"\u003e\n\t\t\u003cinfo\u003eSome info\u003c/info\u003e\n\t\t\u003cnew type=\"summary\"\u003eSome improvement\u003c/new\u003e\n\t\t\u003cbugfix\u003eSome bugfix\u003c/bugfix\u003e\n\t\u003c/release\u003e\n\t\n\t\u003c!-- example with custom filter in release tag --\u003e\n\t\u003crelease versionCode=\"110\" versionName=\"v1.1\" date=\"2018-03-03\" filter=\"dogs\"\u003e\n\t\t\u003cinfo\u003eSome dogs info - filter only set in release tag\u003c/info\u003e\n\t\t\u003cnew type=\"summary\"\u003eSome dogs improvement - filter only set in release tag\u003c/new\u003e\n\t\t\u003cbugfix\u003eSome dogs bugfix - filter only set in release tag\u003c/bugfix\u003e\n\t\u003c/release\u003e\n\t\n\t\u003c!-- example with filters in rows --\u003e\n\t\u003crelease versionCode=\"100\" versionName=\"v1.0\" date=\"2018-03-01\"\u003e\n\t\t\u003cinfo filter=\"cats\"\u003eNew cats added - this info has filter text 'cats'\u003c/info\u003e\n\t\t\u003cinfo filter=\"dogs\"\u003eNew dogs added - this info has filter text 'dogs'\u003c/info\u003e\n\t\t\u003cnew filter=\"cats\"\u003eSome cats improvement - this info has filter text 'cats'\u003c/new\u003e\n\t\t\u003cnew filter=\"dogs\"\u003eSome dogs improvement - this info has filter text 'dogs'\u003c/new\u003e\n\t\t\u003cbugfix filter=\"cats\"\u003eSome cats bugfix - this info has filter text 'cats'\u003c/bugfix\u003e\n\t\t\u003cbugfix filter=\"dogs\"\u003eSome dogs bugfix - this info has filter text 'dogs'\u003c/bugfix\u003e\n\t\u003c/release\u003e\n\u003c/changelog\u003e\n```\n\n### Advanced usage\n\n#### Custom layouts\n\nSimply provide custom a custom renderer (very simply interface), derive it from the default `ChangelogRenderer` to only adjust small things.\n\n```java\nChangelogBuilder builder = new ChangelogBuilder()\n\t.withRenderer(...); // provide a custom item renderer\n```\t\n\nHave a look at following classes to see how this works:\n\n* default renderer: [ChangelogRenderer.java](https://github.com/MFlisar/changelog/blob/master/lib/src/main/java/com/michaelflisar/changelog/classes/ChangelogRenderer.java)\n* example custom renderer: [ExampleCustomRenderer.java](https://github.com/MFlisar/changelog/blob/master/demo/src/main/java/com/michaelflisar/changelog/demo/ExampleCustomRenderer.java)\n\n#### Custom tags\n\n* create a custom tag class that implements [IChangelogTag.java](https://github.com/MFlisar/changelog/blob/master/lib/src/main/java/com/michaelflisar/changelog/tags/IChangelogTag.java)\n* register this class like `ChangelogSetup.get().registerTag(...)`\n* optionally unregister all 3 default tags before adding custom tags if you don't want to use them: `ChangelogSetup.get().clearTags()`\n\n#### Custom sorting\n\n* create a custom tag class that implements [IChangelogSorter.java](https://github.com/MFlisar/changelog/blob/master/lib/src/main/java/com/michaelflisar/changelog/interfaces/IChangelogSorter.java) or use the integrated sorter that sorts by importance (new \u003e info \u003e bugfix \u003e custom)\n* add it to the builder like following:\n\n```java\nChangelogBuilder builder = new ChangelogBuilder()\n\t.withSorter(new ImportanceChangelogSorter()); // or provide a custom sorter\n```\n\n## RAW vs XML resource\n\nIf you do not use apostrophes you can use xml resources, otherwise you should use the raw resources. XML resources are faster (~10x), but they are precompiled and offer limited functionality. RAW resources are slower, but work better. Decide yourself. Use the RAW resource (which is used by default) if you don't know what you should use.\n\n### TODO\n\nSome features are probably nice for some people, I will add them if I need them. Feel free to contribute, I already made some issues for main missing features:\t\n* support online source for xml - https://github.com/MFlisar/changelog/issues/1\n* add some setup features to the default `ChangelogRenderer` (colors, text size, ...)\n\n### Credits\n\nThis library is inspired by https://github.com/gabrielemariotti/changeloglib and the xml parser and the basic idea is heavily based on Gabriele Mariotti code. Thanks for this\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMFlisar%2Fchangelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMFlisar%2Fchangelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMFlisar%2Fchangelog/lists"}