File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,13 @@ buildscript {
88 // mavenLocal()
99 }
1010 dependencies {
11- classpath ' com.vanniktech:gradle-maven-publish-plugin:0.28.0' // for publishing
11+ // Load publish plugin ONLY when publish task is requested
12+ if (gradle. startParameter. taskNames. any { it. toLowerCase(). contains(" publish" ) }) {
13+ classpath ' com.vanniktech:gradle-maven-publish-plugin:0.28.0'
14+ println (" [INFO] Maven Publish plugin ENABLED (publish task detected)." )
15+ } else {
16+ println (" [INFO] Maven Publish plugin SKIPPED (no publish task)." )
17+ }
1218 }
1319}
1420
@@ -28,4 +34,7 @@ dependencies {
2834 // testImplementation 'com.squareup.okhttp3:mockwebserver:3.7.0'
2935}
3036
31- apply plugin : " com.vanniktech.maven.publish"
37+ if (gradle. startParameter. taskNames. any { it. toLowerCase(). contains(" publish" ) }) {
38+ apply plugin : " com.vanniktech.maven.publish"
39+ println (" [INFO] Maven Publish plugin APPLIED (publish task detected)." )
40+ }
You can’t perform that action at this time.
0 commit comments