diff --git a/lib/build.gradle b/lib/build.gradle index 14a2163..0d956d4 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -17,4 +17,9 @@ test { } } -apply from: 'archive.gradle' +// for archiving and uploading to maven central +if (!project.gradle.startParameter.taskNames.isEmpty() && + (project.gradle.startParameter.taskNames[0].endsWith('publish') || + project.gradle.startParameter.taskNames[0].endsWith('publishToMavenLocal'))) { + apply from: 'archive.gradle' +}