Subproject building in Gradle and intelliJ IDEA -


is possibility build non-root module in gradle (intellij idea environment) ?

structure of project this:

javaprojects |- api |- common |- app 

i have 4 build.gradle - 1 every module: javaprojects, api, common , app. in case build parent module - javaprojects, ok. when try build example api, error:

task 'clean' not found in root project 'api'.

so plugin java not visible. freaky, because ide (intellij idea) show me, 'api' build.gradle has task 'clean' (it should inherited root module). of course add

apply plugin : 'java' 

to build.gradle in api module, don't want this. defined in parent build.gradle:

allprojects {     apply plugin: 'java' } 

and in settings.gradle:

rootproject.name = 'javaprojects' includeflat 'api' includeflat 'common' includeflat 'app' 

the gradle clean task inherent , doesn't need explicit declaration.

if module doesn't have configuration defined in project directory structure, gradle goes ahead default directory structure, src/main/java, src/main/resources, src/test/java, src/test/resources.

you've define sources directory in module itself.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -