Gradle: common resource dependency for multiple java projects

后端 未结 6 502
鱼传尺愫
鱼传尺愫 2020-12-28 17:47

I\'m developing a multi-module project with gradle/intellij-idea, and here is the structure of my project home:

project/
  sub-project-1
    /main/resources
         


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 18:42

    The approach I took was to use project reference

    sourceSets {
        main {
            resources {
                srcDirs += [
                    project(':data').sourceSets.main.resources
                ]
            }
        }
    }
    

提交回复
热议问题