{"id":18209040,"url":"https://github.com/kdabir/mksrc","last_synced_at":"2025-04-07T20:25:31.262Z","repository":{"id":49101822,"uuid":"129843116","full_name":"kdabir/mksrc","owner":"kdabir","description":"Gradle plugin to create source directories and autogenerate settings.gradle file","archived":false,"fork":false,"pushed_at":"2021-06-28T23:14:35.000Z","size":239,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T21:50:06.312Z","etag":null,"topics":["create","dirs","gradle-plugin","source"],"latest_commit_sha":null,"homepage":"https://plugins.gradle.org/plugin/com.kdabir.mksrc","language":"Groovy","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/kdabir.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":"2018-04-17T03:53:05.000Z","updated_at":"2021-06-22T13:48:32.000Z","dependencies_parsed_at":"2022-09-19T09:50:44.081Z","dependency_job_id":null,"html_url":"https://github.com/kdabir/mksrc","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/kdabir%2Fmksrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fmksrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fmksrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdabir%2Fmksrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kdabir","download_url":"https://codeload.github.com/kdabir/mksrc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247723491,"owners_count":20985371,"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":["create","dirs","gradle-plugin","source"],"created_at":"2024-11-03T14:03:53.036Z","updated_at":"2025-04-07T20:25:31.231Z","avatar_url":"https://github.com/kdabir.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Make Source Dirs Gradle Plugin\n\n[![Gradle Plugin](https://img.shields.io/maven-metadata/v?color=green\u0026label=Gradle%20Plugin\u0026logo=Gradle\u0026metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fcom.kdabir.mksrc%2Fmksrc%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/com.kdabir.mksrc)\n\n\n\n1. Creates source directory structure as per the applied plugins (`java`, `groovy`, `kotlin`, `scala`, `war`) and custom `sourceSet` dirs\n2. Automatically generate / updates `settings.gradle` file to include child projects based on convention\n\n## Usage\n\nApply the plugin to the project\n\n    plugins {\n      id \"com.kdabir.mksrc\" version \"1.1.1\"\n    }\n\n\nThe plugin adds `makeSourceDirs` to the project. Run the following command \n\n    $ gradle makeSourceDirs \n\nBased on the plugins applied to project (and configured `sourceSets`), the source dirs will be created \n\n    $ tree src\n    src\n    ├── main\n    │   ├── java\n    │   └── resources\n    └── test\n        ├── java\n        └── resources\n\n\n\n\n## For multi-project builds\n\nIf the top level project doesn't need source dirs, but the subprojects do, then use `apply false` in `plugins` block \nand apply the plugin to all `subprojects`. Adding the following snippet in the top level project's `build.gradle` \nshould work :\n \n\n```\nplugins {\n  id \"com.kdabir.mksrc\" version \"1.1.1\" apply false\n}\n\nsubprojects {\n  apply plugin: 'com.kdabir.mksrc'\n}\n```\n\n\n## Generating `settings.gradle` File Automatically\n\nIn a multi-module project, it is often pain to keep `settings.gradle` in sync with the nested modules/projects structure\n(as we need to include sub-projects explicitly). Also, since all files are named `build.gradle`, it is hard to locate \nthe right build file for the sub-project (in IDEs). This plugin solves both the problems by using simple convention and \nthen generating/syncing `settings.gradle` file on-demand. \n\nInstead of naming the build files for all sub-projects as `build.gradle`, we keep a `\u003cmodule-name\u003e.gradle` \nwithin the `\u003cmodule-name\u003e/` dir. The plugin adds `generateSettingsFile` task to the project. This task \nupdates `settings.gradle` to include all sub projects' `\u003cmodule-name\u003e/\u003cmodule-name\u003e.gradle` into the build.     \n\n\nUsage:\n\n    $ gradle generateSettingsFile \n\n\n\u003e do commit your existing settings.gradle to version control before calling this task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdabir%2Fmksrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdabir%2Fmksrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdabir%2Fmksrc/lists"}