{"id":30676168,"url":"https://github.com/almogtavor/auto-composite-build","last_synced_at":"2025-10-08T13:24:03.863Z","repository":{"id":44355205,"uuid":"512225683","full_name":"almogtavor/auto-composite-build","owner":"almogtavor","description":"Automate Gradle composite builds","archived":false,"fork":false,"pushed_at":"2025-05-20T21:56:31.000Z","size":99,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T22:58:39.477Z","etag":null,"topics":["composite-builds","gradle","gradle-build","gradle-compositebuild","gradle-plugin","groovy","kotlin"],"latest_commit_sha":null,"homepage":"","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/almogtavor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2022-07-09T15:53:45.000Z","updated_at":"2025-05-20T21:56:35.000Z","dependencies_parsed_at":"2024-08-13T22:34:13.153Z","dependency_job_id":null,"html_url":"https://github.com/almogtavor/auto-composite-build","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/almogtavor/auto-composite-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almogtavor%2Fauto-composite-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almogtavor%2Fauto-composite-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almogtavor%2Fauto-composite-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almogtavor%2Fauto-composite-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almogtavor","download_url":"https://codeload.github.com/almogtavor/auto-composite-build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almogtavor%2Fauto-composite-build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100872,"owners_count":25045700,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["composite-builds","gradle","gradle-build","gradle-compositebuild","gradle-plugin","groovy","kotlin"],"created_at":"2025-09-01T09:42:17.363Z","updated_at":"2025-10-08T13:23:58.781Z","avatar_url":"https://github.com/almogtavor.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏗️ Auto Composite Build Gradle Plugin\n\nThe Auto Composite Build Gradle Plugin is designed to solve the path reference issue that arises when using Gradle's composite build feature. Typically, for a team to use a shared common logic project, all developers must clone both the common logic project and the related projects into identical file paths on their local machines. This can cause issues with path references when sharing projects via version control. The Auto Composite Build plugin eliminates this problem by allowing the use of Gradle's composite builds in a Git-compatible way.\n\n### A demonstration for the problem of Gradle's composite build:\nLet's assume one computer #1 cloned project `common-logic` to `C:\\\\code\\common-logic` and uses it in `C:\\\\code\\service1`.\n```\ncomputer #1\n└── C\n    └── code\n        ├── common-logic\n        └── service1\n```\nSo `C:\\\\code\\service1` will have the line of `include(\"../common-logic\")` \nor `include(\"C:\\\\code\\common-logic\")` on `settings.gradle`.\n\u003cbr\u003eAnother had the following hierarchy.\n```\ncomputer #2\n└── C\n    ├── my-code\n    │   └── common-logic\n    └── service1\n```\nSo `C:\\\\service1` will need to have the line of `include(\"../my-code/common-logic\")` \nor `include(\"C:\\\\my-code\\common-logic\")` on `settings.gradle`.\n\u003cbr\u003eIn both declarations, if the `settings.gradle` file will get uploaded to Git, the Gradle's composite build feature will break.\n\n## How Auto Composite Build solved this?\nThe Auto Composite Build plugin registers `common-logic` to a global file inside the user's home. \nProjects can query the module from the file, and it doesn't matter the structure of the projects on the developer's computer.\n```\ncomputer #1\n└── C\n    ├── my-code\n    │   └── common-logic\n    ├── service1\n    └── Users\n        └── OurExampleUser\n            └── .auto-composite-build\n                └── git.details\n```\n\n## Usage\n\nAuto Composite build has compiled with JDK 1.8 for backward compatibility.\n\n#### Kotlin DSL\n\nIn the kotlin-based `settings.gradle.kts`:\n```kotlin\nplugins {\n    id (\"io.github.almogtavor.auto-composite-build\") version \"1.1.0\"\n}\n\nautoCompositeBuild {\n    autoIncludeBuilds(\"my-first-app\", \"my-second-app\")\n}\n```\n\n#### Groovy DSL\n\nIn the groovy-based `settings.gradle`:\n```groovy\nplugins {\n    id \"io.github.almogtavor.auto-composite-build\" version \"1.1.0\"\n}\n\nautoCompositeBuild {\n    autoIncludeBuilds(\"my-first-app\", \"my-second-app\")\n}\n```\n\n## Available Tasks\n\n* `./gradlew addRepoToGitDetails` - Adds the current repository to the local `.auto-composite-build` folder.\u003cbr\u003e\n    You should run this task for every project you'd like to include as composite build.\n    This task will run automatically when configuring the Auto Composite Build plugin.\n* `./gradlew includeModulesAsCompositeBuilds` - This task generates the `composite-build.gradle` or `composite-build.gradle.kts`\n    that holds the paths for the modules that should be included.\u003cbr\u003e\n    This task must run only after `addRepoToGitDetails` run in all the modules that you've configured to include.\n    This task will run automatically when configuring the Auto Composite Build plugin.\n* `./gradlew deleteGitDetails` - Should not be used. This was implemented only for edge cases. \n    This task deletes the `git.details` file (and warns before).\n\n### Limitations\n\nIn case of moving the path of the repository of a module that is included as a composite build, the plugin will throw an error.\nTo get away with this you should rerun the `./gradlew addRepoToGitDetails` task.\nIn edge cases there's a `./gradlew deleteGitDetails` task which will allow you to delete your local's `git.details` file.\n\nAuto composite build assumes you can add the plugin to the to-be-included project, too.\nIf you can't, you can go to the `git.details` and add the to-be-included project's path manually.\n\n### Alternatives\n\nThere are two relevant alternatives on this subject, that tries to solve a similar problem at the area of Gradle's composite builds.\nThese are:\n- [includegit-gradle-plugin](https://github.com/melix/includegit-gradle-plugin) - \n    which enables to reference a git repository and a local directory to scan.\n- [includeme](https://github.com/TradeMe/IncludeMe)\n    which will automatically scan the upper directory, of go to further levels if specified.\nBoth of these won't let you upload the project to Git when some each user of it places it on another path.\nAuto composite build tries to solve this by assuming you will already clone the to-be-included project, and that you can add this plugin to it too.\nAnd as said, if not, you can always go to the `git.details` and add its path manually.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmogtavor%2Fauto-composite-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmogtavor%2Fauto-composite-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmogtavor%2Fauto-composite-build/lists"}