@@ -26,6 +26,8 @@ allprojects {
26
26
version = scmVersion. version
27
27
}
28
28
29
+ println " Building version $version "
30
+
29
31
tasks. named(" generateChangelog" ) {
30
32
previousRevision = scmVersion. previousVersion
31
33
githubToken = System . getenv(" GITHUB_TOKEN" )
@@ -59,13 +61,31 @@ nexusPublishing {
59
61
}
60
62
}
61
63
62
- if (version. endsWith(" -SNAPSHOT" )) {
64
+ def isSnapshot = version. endsWith(" -SNAPSHOT" )
65
+
66
+ if (isSnapshot) {
67
+ println " Building a -SNAPSHOT version (Github release and Maven Central tasks are skipped)"
63
68
tasks. named(" githubRelease" ) {
64
- // snapshot versions do not produce changelog / GitHub releases
69
+ // snapshot versions do not produce changelog / Github releases
65
70
enabled = false
66
71
}
67
72
tasks. named(" closeAndReleaseStagingRepository" ) {
68
73
// snapshot binaries are available in Sonatype without the need to close the staging repo
69
74
enabled = false
70
75
}
76
+ }
77
+
78
+ tasks. register(" releaseSummary" ) {
79
+ doLast {
80
+ if (isSnapshot) {
81
+ println " RELEASE SUMMARY\n " +
82
+ " SNAPSHOTS released to: https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/kotlin/mockito-kotlin\n " +
83
+ " Release to Maven Central: SKIPPED FOR SNAPSHOTS\n " +
84
+ " Github releases: SKIPPED FOR SNAPSHOTS"
85
+ } else {
86
+ println " RELEASE SUMMARY\n " +
87
+ " Release to Maven Central (available after delay): https://repo1.maven.org/maven2/org/mockito/kotlin/mockito-kotlin/\n " +
88
+ " Github releases: https://github.com/mockito/mockito-kotlin/releases"
89
+ }
90
+ }
71
91
}
0 commit comments