Gradle: How to configure multiproject setup with side-by-side projects

后端 未结 1 572
野性不改
野性不改 2020-12-09 10:16

We have an old project that is set up like this:

.
├── customizationProject
│   ├── ejb
│   └── services
├── projectA
│   ├── ejb
│   └── shared
├── projectB         


        
相关标签:
1条回答
  • 2020-12-09 10:32

    This is a fairly easy structure to support with Gradle. Add a settings.gradle file to your customizationProject directory with this content:

    includeFlat 'projectA', 'projectB', 'projectC'
    

    And you can confirm the project structure from the command line:

    $ gradle projects
    :projects
    
    ------------------------------------------------------------
    Root Project
    ------------------------------------------------------------
    
    Root project 'customizationProject'
    +--- Project ':projectA'
    +--- Project ':projectB'
    \--- Project ':projectC'
    

    The description of the includeFlat method is available in the Gradle documentation.

    Hope that helps!

    0 讨论(0)
提交回复
热议问题