{"id":13610136,"url":"https://github.com/ismaeldivita/change-tracker-plugin","last_synced_at":"2025-04-12T22:32:48.229Z","repository":{"id":47922334,"uuid":"195821040","full_name":"ismaeldivita/change-tracker-plugin","owner":"ismaeldivita","description":"A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.","archived":false,"fork":false,"pushed_at":"2021-10-19T10:54:24.000Z","size":662,"stargazers_count":112,"open_issues_count":3,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-07T16:42:14.749Z","etag":null,"topics":["android","gradle","gradle-plugin","modules","test"],"latest_commit_sha":null,"homepage":"","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/ismaeldivita.png","metadata":{"files":{"readme":"README.md","changelog":"change_tracker/build.gradle","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-08T13:46:46.000Z","updated_at":"2024-06-28T14:42:58.000Z","dependencies_parsed_at":"2022-08-12T14:20:15.746Z","dependency_job_id":null,"html_url":"https://github.com/ismaeldivita/change-tracker-plugin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaeldivita%2Fchange-tracker-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaeldivita%2Fchange-tracker-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaeldivita%2Fchange-tracker-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaeldivita%2Fchange-tracker-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismaeldivita","download_url":"https://codeload.github.com/ismaeldivita/change-tracker-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641363,"owners_count":21138192,"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","gradle","gradle-plugin","modules","test"],"created_at":"2024-08-01T19:01:41.609Z","updated_at":"2025-04-12T22:32:47.964Z","avatar_url":"https://github.com/ismaeldivita.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Change Tracker Plugin\n\nA Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.\n\nThe idea behind this plugin is to optimize running verification tasks on large modularized projects. There is no need to run these tasks on all modules every time we apply a change. Instead, we could run them only on modules affected by the changes and their dependents.\n\n___\n\nTake the following project structure as an example:\n\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"450\" src=\"./assets/project.png\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\nIf you apply changes to the `:profile-service` module, you only need to run your verification tasks on `:profile-service`, `:profile-feature`, and `:app`. It's safe to skip the tasks on all the other modules since they don't depend on `:profile-service` and can't be affected by these changes.\n\n## Setup\n\nApply the plugin and the configuration to your root project `build.gradle`\n\n```groovy \nplugins {\n    id 'com.ismaeldivita.changetracker' version '0.7.4'\n}\n\n// ...\n\nchangeTracker {\n    tasks = ['lint','testDebugUnitTest']\n    whitelist = [':app']\n    blacklist = [':network',':featureA']\n    reevaluate = [':sharedTest']\n    branch = \"master\"\n    remote = \"origin\"\n}\n```\n\n- `tasks`: List of the tasks the plugin will need to create.\n- `branch`: Name of the branch that should be used to extract the diff.\n- `whitelist` (optional): List of modules that should **always** run.\n- `blacklist` (optional): List of modules that should **never** run.\n- `reevaluate` (optional): List of modules that will trigger the task for all modules\n- `remote` (optional): Name of the remote repository.\n\n## Usage\n\nThe plugin will generate new tasks on the root project for each task provided on the configuration with the following name `${taskName}ChangedModules`.\n\nTaking as an example the configuration above the plugin will generate two new tasks `lintChangedModules` and `testDebugUnitTestChangedModules`.\n\nTo run your task:\n\n```\n./gradlew testDebugUnitTestChangedModules\n```\n\nYou can override the default branch used for the comparison when running your command. This is useful when you're using the plugin on pull requests and each pull request may have different base branches.\n```\n./gradlew testDebugUnitTestChangedModules -Pbranch=dev\n```\n\n## Notes\n- This plugin will assume you use GIT as your VCS.\n- Any changes to the root project or `buildSrc` will trigger the task for all modules.\n- Test configurations will not be tracked since dependency cycles could be created for test purposes and this is not supported by this plugin. If you have a shared test library project and want to trigger the tasks on their dependents check the `reevaluate` configuration.\n\n## License\nMIT License\n\nCopyright (c) 2019 Ismael Di Vita\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaeldivita%2Fchange-tracker-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismaeldivita%2Fchange-tracker-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaeldivita%2Fchange-tracker-plugin/lists"}