In gradle how to use sources from relative path outside of project

喜夏-厌秋 提交于 2019-12-12 11:09:07

问题


I have following 2 projects placed adjacent to each other in some folder and I want to include specific sources from a non-gradle project into this project with the structure as follows.

rootfolder/
  my-gradle-project/
    src/main/java
    build.gradle

  my-non-gradle-project/
    src/main/java/com/example/utils

In build.gradle why would following not work ? What alternative do I have ?

Additionally I need to included specific java sources from the non-gradle project.

build.gradle

sourceSets.main.java.srcDirs = [
          'src/main/java', 
           '../my-non-gradle-project/src/main/java/com/example/util')]

来源:https://stackoverflow.com/questions/41190324/in-gradle-how-to-use-sources-from-relative-path-outside-of-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!