{"id":20590041,"url":"https://github.com/doist/changelog-gradle-plugin","last_synced_at":"2025-04-14T22:24:42.577Z","repository":{"id":44543578,"uuid":"322544520","full_name":"Doist/changelog-gradle-plugin","owner":"Doist","description":"Changelog Gradle plugin","archived":false,"fork":false,"pushed_at":"2023-09-20T00:27:44.000Z","size":104,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T10:21:47.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Doist.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T09:10:24.000Z","updated_at":"2022-12-09T08:32:22.000Z","dependencies_parsed_at":"2024-11-16T07:34:05.819Z","dependency_job_id":"ff692166-0b5f-419b-b2ec-63bd4ffc8e75","html_url":"https://github.com/Doist/changelog-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fchangelog-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fchangelog-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fchangelog-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fchangelog-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doist","download_url":"https://codeload.github.com/Doist/changelog-gradle-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248970176,"owners_count":21191387,"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":[],"created_at":"2024-11-16T07:33:45.335Z","updated_at":"2025-04-14T22:24:42.571Z","avatar_url":"https://github.com/Doist.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Changelog Gradle plugin\n\nThis Gradle plugin adds tasks to manage changelog.\n\nThe expected changelog consists of two parts:\n- pending changelog entries\n- changelog file\n\nPending changelog entries are stored in a pending changelog folder, one entry per line. For example:\n```text\nls pending-changelog\nft.feature_1.txt\nft.feature_2.txt\n    \ncat ft.feature_1.txt\nRefactor sample class\nAdd feature 1\n\ncat ft.feature_2.txt\nAdd feature 2\n```\n\nChangelog file is, for example:\n```\n# Changelog\n\n## v15.0.1 - 2020-12-15\n- Fix some bug\n- Add some functionality\n\n## v15.0.0 - 2020-12-10\n- Refactor some class\n\n...\n```\n\n## How to use it 👣\n\nInclude and configure the plugin in `build.gradle.kts` file:\n\n```\nplugins {\n    id(\"com.doist.gradle.changelog\") version \"\u003clatest-version\u003e\"\n}\n\nconfigure\u003cChangelogExtension\u003e {\n    pendingChangelogDir.set(project.file(\"pending-changelog\"))\n    changelogFile.set(project.file(\"CHANGELOG.md\"))\n\n    addRule(\"max length is 72 characters\") { it.length \u003c= 72 }\n    addRule(\"cannot end with a dot\") { !it.endsWith(\".\") }\n\n    commit {\n        val version = getVersion()\n        val date = LocalDate.now().format(DateTimeFormatter.ISO_DATE)\n        prefix = \"## $version - $date\"\n        entryPrefix = \"- \"\n        insertAtLine = 2\n    }\n}\n```\n\nYou can now run:\n```\n./gradlew checkChangelog\n```\nThis task reads every line in every file in the `pendingChangelogDir` folder and checks if the line\ndoes not break any rule.\n\nYou can also run:\n```\n./gradlew commitChangelog\n``` \nThis task appends every line from every file in the `pendingChangelogDir` folder to the\n`changelogFile` file. It uses the configuration specified in the `commit {...}` section. It also \nremoves every file in the `pendingChangelogDir`. To avoid removing the folder itself, we recommend\nputting a file named `.gitkeep.` in `pendingChangelogDir`.\n\n## Configuration ⚙️\n\nAvailable configuration is:\n```\nconfigure\u003cChangelogExtension\u003e {\n    // Changelog directory with pending entries.\n    pendingChangelogDir.set(project.file(\"changelog\"))\n    \n    // Files to ignore in pendingChangelogDir.\n    ignoreFiles.set(listOf(\".gitkeep\"))\n    \n    // Changelog file.\n    changelogFile.set(project.file(\"CHANGELOG.md\"))\n    \n    // Fallback message when there are no pending changes.\n    emptyChangelogMessage.set(\"No major changes\")\n\n    // Rules.\n    addRule(\"max length is 72 characters\") { it.length \u003c= 72 }\n\n    // commitChangelog task configuration. \n    commit {\n        val version = getVersion()\n        val date = LocalDate.now().format(DateTimeFormatter.ISO_DATE)\n        \n        // String to prepend to the changelog commit.\n        prefix = \"## $version - $date\"\n        \n        // String to append to the changelog commit.\n        postfix = \"---\"\n        \n        // String to prepend to every changelog entry.\n        entryPrefix = \"- \"\n        \n        // String to append to every changelog entry.\n        entryPostfix = \"\"\n        \n        // Position where the changelog entries are inserted. \n        insertAtLine = 2\n    }\n}\n``` \n\n## Contributing 🤝\n\nFeel free to open an issue or submit a pull request for any bugs/improvements.\n\n## Acknowledgements 🙏\nThis plugin is based on [kotlin-gradle-plugin-template 🐘](https://github.com/cortinico/kotlin-gradle-plugin-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fchangelog-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoist%2Fchangelog-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fchangelog-gradle-plugin/lists"}