Gradle exclude a specific subproject from full build

前端 未结 4 1990
别那么骄傲
别那么骄傲 2020-12-13 19:31


In our Gradle project, we want to add a new module for functional-tests that needs to be able to access dependencies from other subprojects but still not be run as

4条回答
  •  甜味超标
    2020-12-13 20:16

    I do it like this:

    //for all sub projects
    subprojects {
        if (it.name != 'project name') {
            //do something
        }
    }
    

    by this way, I can exclude some special project in subprojects.

    you can also use it in allprojects or project.

提交回复
热议问题