{"id":25720105,"url":"https://github.com/gregwhitaker/gradle-monorepo-buildsrc-example","last_synced_at":"2026-04-18T12:03:20.912Z","repository":{"id":82732539,"uuid":"170040346","full_name":"gregwhitaker/gradle-monorepo-buildsrc-example","owner":"gregwhitaker","description":"Example of building a monorepo using Gradle Composite Builds with common buildSrc","archived":false,"fork":false,"pushed_at":"2019-02-16T18:54:11.000Z","size":272,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T03:03:13.217Z","etag":null,"topics":["gradle","gradle-build","gradle-buildsrc","gradle-compositebuild","gradle-java","monorepo"],"latest_commit_sha":null,"homepage":"https://docs.gradle.org/current/userguide/composite_builds.html","language":"Java","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/gregwhitaker.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":"2019-02-10T23:37:45.000Z","updated_at":"2025-01-13T08:59:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d366970c-fe34-4918-a31e-816432ae5bea","html_url":"https://github.com/gregwhitaker/gradle-monorepo-buildsrc-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregwhitaker/gradle-monorepo-buildsrc-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fgradle-monorepo-buildsrc-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fgradle-monorepo-buildsrc-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fgradle-monorepo-buildsrc-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fgradle-monorepo-buildsrc-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregwhitaker","download_url":"https://codeload.github.com/gregwhitaker/gradle-monorepo-buildsrc-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fgradle-monorepo-buildsrc-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31967993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["gradle","gradle-build","gradle-buildsrc","gradle-compositebuild","gradle-java","monorepo"],"created_at":"2025-02-25T17:36:35.270Z","updated_at":"2026-04-18T12:03:20.892Z","avatar_url":"https://github.com/gregwhitaker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gradle-monorepo-example\n\nAn example of building projects in a monorepo using [Gradle Composite Builds](https://docs.gradle.org/current/userguide/composite_builds.html) that share a common [buildSrc](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources).\n\nNOTE: After further investigation and attempts to make this work on a larger, more complex, project it appears that buildSrc on composite builds is not a fully supported feature at this time and YMMV with this approach. The good news is that according to the Gradle docs it appears that official support for this functionality is in the works.\n\n## Repository Structure\nThe repository contains four projects each with their own Gradle configurations.\n\nProjects A, B, and C have dependencies on one another:\n\n    [project-a] -- DEPENDS --\u003e [project-b] -- DEPENDS --\u003e [project-c]\n    \nProject D has no dependencies on the other projects:\n    \n    [project-d]\n    \nAll four projects also have access to the common `buildSrc` directory where they can get tasks and plugins that are\nshared amongst them.\n\n## Running the Example\nFollow the steps below to run the example:\n\n### Run `hello` Task in Project A\nRun the following commands to build [project-a](project-a):\n\n1. Change the working directory to [project-a](project-a):\n\n        cd project-a\n        \n2. Run the following command to execute the hello task:\n\n        ./gradlew hello\n\n    If successful, you will see the following in the console:\n    \n        \u003e Task :hello\n        Hello from task :hello!\n        \n### Run `hello` Task in Project D\nRun the following commands to build [project-d](project-d):\n\n1. Change the working directory to [project-d](project-d):\n\n        cd project-d\n        \n2. Run the following command to execute the hello task:\n\n        ./gradlew hello\n\n    If successful, you will see the following in the console:\n    \n        \u003e Task :hello\n        Hello from task :hello!\n                \n## Working in IntelliJ\nIntelliJ supports Gradle Composite Builds and will automatically open any included builds for a project.\n\nTo see this in action, open [project-a](project-a) in your IntelliJ IDE. You will notice that IntelliJ automatically\nopens [project-b](project-d) as well as the [buildSrc](buildSrc) project because they are both dependencies of the\ncurrent project.\n\n![intellij](intellij_screenshot.png)\n\n## Bugs and Feedback\nFor bugs, questions, and discussions please use the [Github Issues](https://github.com/gregwhitaker/gradle-monorepo-buildsrc-example/issues).\n\n## License\nMIT License\n\nCopyright (c) 2019 Greg Whitaker\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%2Fgregwhitaker%2Fgradle-monorepo-buildsrc-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregwhitaker%2Fgradle-monorepo-buildsrc-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Fgradle-monorepo-buildsrc-example/lists"}