David Liu

Disable nexus staging plugin stuff while on snapshots

正在显示 1 个修改的文件 包含 13 行增加0 行删除
@@ -62,3 +62,16 @@ ext { @@ -62,3 +62,16 @@ ext {
62 annotations = [ 62 annotations = [
63 ] 63 ]
64 } 64 }
  65 +afterEvaluate {
  66 + // These aren't supported for snapshots. From nexus staging plugin.
  67 + if (VERSION_NAME.contains("SNAPSHOT")) {
  68 + ["closeAndReleaseRepository",
  69 + "closeRepository",
  70 + "createRepository",
  71 + "getStagingProfile",
  72 + "releaseRepository"]
  73 + .forEach { taskName ->
  74 + getTasksByName(taskName, false).forEach { task -> task.enabled = false }
  75 + }
  76 + }
  77 +}