diff --git a/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy b/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy index dfd5d8e..95eda45 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy @@ -70,8 +70,13 @@ abstract class ComposeSettings { protected Boolean customProjectNameSet protected String safeProjectNamePrefix void setProjectName(String customProjectName) { - this.customProjectName = customProjectName - this.customProjectNameSet = true + if (customProjectName == null || customProjectName.isEmpty()) { + this.customProjectName = null + this.customProjectNameSet = false + } else { + this.customProjectName = customProjectName + this.customProjectNameSet = true + } } private Provider projectNameProvider Provider getProjectName() {