How to identify if module runs within composite build

When executed as an included build within a composite build, project.gradle.parent != null