diff --git a/src/gradle.ts b/src/gradle.ts index 2e75f7d9..2102c085 100644 --- a/src/gradle.ts +++ b/src/gradle.ts @@ -65,6 +65,15 @@ export function getTaskToPublish( logger.info(INFO_ARTIFACTORY); } tasks = ["artifactoryDeploy"]; + } else if (line.startsWith("artifactoryPublish -")) { + // Plugins Gradle Artifactory Plugin and Maven Publish Plugin are often used together + if (tasks.length !== 0 && tasks[0] !== "publish") { + reject(new Error(ERROR_MULTIPLE_PLUGIN)); + } + if (tasks.length !== 0 && tasks[0] === "publish") { + logger.info(INFO_ARTIFACTORY); + } + tasks = ["artifactoryPublish"]; } else if (line.startsWith("publish -")) { // Plugins Gradle Artifactory Plugin and Maven Publish Plugin are often used together if (