Skip to content

Commit c9c01a8

Browse files
committed
fix ordering
1 parent eacfb48 commit c9c01a8

1 file changed

Lines changed: 24 additions & 15 deletions

File tree

build.gradle.kts

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ private fun Project.getSecret(name: String): Provider<String> = provider {
3131
property(propName) as String
3232
}
3333

34+
scmVersion {
35+
tag {
36+
prefix = "javacan-"
37+
}
38+
nextVersion {
39+
suffix = "SNAPSHOT"
40+
separator = "-"
41+
}
42+
versionCreator = PredefinedVersionCreator.SIMPLE.versionCreator
43+
}
44+
45+
val gitVersion: String = scmVersion.version
46+
47+
allprojects {
48+
group = "tel.schich"
49+
version = gitVersion
50+
}
51+
3452
deploy {
3553
// dirs to upload, they will all be packaged into one bundle
3654
dirs = provider {
@@ -48,23 +66,14 @@ deploy {
4866
}
4967
}
5068

51-
scmVersion {
52-
tag {
53-
prefix = "javacan-"
54-
}
55-
nextVersion {
56-
suffix = "SNAPSHOT"
57-
separator = "-"
69+
tasks.deploy {
70+
for (project in allprojects) {
71+
val publishTasks = project.tasks
72+
.withType<PublishToMavenRepository>()
73+
mustRunAfter(publishTasks)
5874
}
59-
versionCreator = PredefinedVersionCreator.SIMPLE.versionCreator
6075
}
6176

62-
val gitVersion: String = scmVersion.version
63-
64-
allprojects {
65-
group = "tel.schich"
66-
version = gitVersion
67-
}
6877
val isSnapshot = project.version.toString().endsWith("-SNAPSHOT")
6978

7079
val publishAllToMavenLocal by tasks.registering(DefaultTask::class) {
@@ -117,7 +126,7 @@ val mavenCentralDeploy by tasks.registering(DefaultTask::class) {
117126

118127
val githubActions by tasks.registering(DefaultTask::class) {
119128
group = "publishing"
120-
val deployRefPattern = """^refs/(?:tags/javacan-\d+.\d+.\d+|heads/master)$""".toRegex()
129+
val deployRefPattern = """^refs/(?:tags/javacan-\d+\.\d+\.\d+|heads/master)$""".toRegex()
121130
val ref = System.getenv("GITHUB_REF")?.ifBlank { null }?.trim()
122131

123132
if (ref != null && deployRefPattern.matches(ref)) {

0 commit comments

Comments
 (0)