Gradle sub-sub-projects with same name in does not work for eclipse -
Gradle sub-sub-projects with same name in does not work for eclipse -
i have next structure
root |- foo | |- implementation | | \- build.gradle | \- interface | \- build.gradle | |- bar | |- implementation | | \- build.gradle | \- interface | \- build.gradle | |- build.gradle \- settings.gradle in settings.gradle have following:
include ':foo:implementation', ':foo:interface' include ':bar:implementation', ':bar:interface' in build.gradle on root folder set of them dependency
dependencies { compile project(':foo:implementation') compile project(':foo:interface') compile project(':bar:implementation') compile project(':bar:interface') } eclipse needs each project have distinct names. gradle default uses project name name these in eclipse. eclipse unable distinguish between ':foo:implementation' , ':bar:implementation:' both named 'implementation' within eclipse. in mind should have been solvable setting eclipse project name more specific, e.g.:
allprojects { eclipse.project { if (project == rootproject) { name = rootproject.name } else { name = rootproject.name + project.path.replace(":", "-") } } } with unique project names, when @ .classpath xml 1 of implementation projects , 1 of interface projects present.
any idea?
so far, i've been working "single dir level" multiprojects; scenario, there several ways prepare it:
if want prepare eclipse , if you're using "import gradle project" wizard, might want set "use hierarchical project names" check box. not sure how behaves in case (double dir level) next 1 can help out: how rename project in gradle instead of using folder name?. investigation double dir level. alter gradle project names btw and indeed, eclipse plugin provides means alter project names, haven't used myself though... eclipse gradle
Comments
Post a Comment