Search Unity

Build gradle exclude module in dependencies without compiling

Discussion in 'Editor & General Support' started by Vaitor, Apr 8, 2020.

  1. Vaitor

    Vaitor

    Joined:
    May 15, 2014
    Posts:
    11
    Hello,

    What is the syntax to exclude a module in dependencies section when building gradle?
    I have a mainTemplate.gradle where I want to exclude some modules.

    But if I use "compile" it says that its already compile and fails building.
    compile([plugin]) {
    transitive = true
    exclude module: [module1]
    exclude module: [module2]
    }

    I try with this. Do not fails, but also do not exclude:
    api (project([plugin])) {
    transitive = true
    exclude module: [module1]
    exclude module: [module2]
    }

    The android resolver is creating the other parts of the file.

    Thanks
    Víctor
     
  2. Vaitor

    Vaitor

    Joined:
    May 15, 2014
    Posts:
    11
    Some help with that syntax?