{"id":13665263,"url":"https://github.com/elarib/partial-sbt","last_synced_at":"2025-03-25T20:33:03.428Z","repository":{"id":35789728,"uuid":"219067760","full_name":"elarib/partial-sbt","owner":"elarib","description":" Apply some sbt task/commands on only the modules/sub-modules (and their reverse dependencies) based on git changes","archived":false,"fork":false,"pushed_at":"2022-01-18T08:20:56.000Z","size":28,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-02T06:01:49.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","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/elarib.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}},"created_at":"2019-11-01T21:50:29.000Z","updated_at":"2024-05-20T13:53:48.000Z","dependencies_parsed_at":"2022-08-08T11:16:38.494Z","dependency_job_id":null,"html_url":"https://github.com/elarib/partial-sbt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elarib%2Fpartial-sbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elarib%2Fpartial-sbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elarib%2Fpartial-sbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elarib%2Fpartial-sbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elarib","download_url":"https://codeload.github.com/elarib/partial-sbt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222090807,"owners_count":16929472,"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-08-02T06:00:31.132Z","updated_at":"2024-10-29T18:26:06.964Z","avatar_url":"https://github.com/elarib.png","language":"Scala","readme":"[![Build Status](https://travis-ci.com/elarib/partial-sbt.svg?branch=master)](https://travis-ci.com/elarib/partial-sbt) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.elarib/partial-sbt/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.elarib/partial-sbt)\n\nPartial-sbt\n============\n\nThe goal is simple: Apply some sbt tasks/commands on only the modules/sub-modules changed between two git commits or two git branches, including their reverse dependencies.\n\nThe main purpose behind, is to reduce build, test \u0026 integration test times. \n\nFor example: \n\n - Test and deploy only modules (and their reverse dependencies) that have been changed between develop branch and feature x branch\n - Package only modules (and their reverse dependencies) that have been changed between two git commits.\n \nProject example:\n\n - Check out : https://github.com/elarib/partial-sbt/blob/master/src/sbt-test/test-projects/multi-module-project/build.sbt \n - Change scenarios : https://github.com/elarib/partial-sbt/tree/master/src/sbt-test/test-projects/multi-module-project/changes\n - Expected output of each change : https://github.com/elarib/partial-sbt/tree/master/src/sbt-test/test-projects/multi-module-project/expected \n\nRequirements\n------------\n\n* SBT\n* Git managed repository.\n\nSetup\n-----\n\n### Using Published Plugin\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.elarib/partial-sbt/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.elarib/partial-sbt)\n\nAdd sbt-assembly as a dependency in `project/plugins.sbt`:\n\n```scala\naddSbtPlugin(\"com.elarib\" % \"partial-sbt\" % \"0.1\")\n```\n\nUsage\n-----\n\n### Applying the plugin in your build.sbt\n\n```scala\nenablePlugins(com.elarib.PartialSbtPlugin)\n```\n\n### `changedProjects` task\n\nNow you have the `changedProjects` task, that list you all the modules (and their reverse dependencies) changed.\nYou have the possibility to get the changed projects  :\n- Between two git branches using: \n    ```sbt\n    \u003e changedProjects gitBranch sourceLocalBranch targetLocalBranch\n    ```\n- Between two git commits using: \n    ```scala\n    \u003e changedProjects gitCommit oldCommitId newCommitId\n    ```\n\n\n### `metaBuildChangedFiles` task\n\nList you all the changed meta build files  :\n- Between two git branches using: \n    ```sbt\n    \u003e metaBuildChangedFiles gitBranch sourceLocalBranch targetLocalBranch\n    ```\n- Between two git commits using: \n    ```scala\n    \u003e metaBuildChangedFiles gitCommit oldCommitId newCommitId\n    ```\n\nHow it works\n------------\n\n### 1. Get changed files\n\n`jgit` is used to list the diff between two branches or two commits.\n\n### 2. Check if there is some main metabuild file changed\n\nIf yes, the whole project was changed, and they will be a need to reload (or build/test ...)\nIf no, continue to next step.\n\n### 3. List all modules impacted\n\nList all modules impacted based on the changed files (step1) with all their reverse dependencies.\n\nAnd finally list them, or apply the command or task need (not implemented yet).\n\n\nTODO\n------------\n- [ ] Apply commands to changed modules.\n- [ ] Deploy to some maven repo manager.\n\nLicense\n-------\n\nCopyright (c) 2019 [Abdelhamide EL ARIB](https://twitter.com/elarib29) \n\nPublished under The MIT License.","funding_links":[],"categories":["BUILD \u0026 RELEASE"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felarib%2Fpartial-sbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felarib%2Fpartial-sbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felarib%2Fpartial-sbt/lists"}