Prev Next

DevOps / Gradle interview questions

What are allprojects and subprojects sections in Gradle build file.

A multi-project gradle build will have rootProject and the subprojects, both together is considered as allprojects. The build starts from rootProject however it usually has no code, subproject does. allproject section can have dependencies seen by all projects while subproject dependencies seen only by those sub projects.

Usually subproject only apply Java plugin as it got code.

subprojects {
    apply plugin: 'java'
} 

More Related questions...

Show more question and Answers...


Comments & Discussions