Skip to content

Commit 6cd4d0a

Browse files
committed
Archive artifacts from dedicated task instead of everything in build/libs
1 parent 4e2f7e4 commit 6cd4d0a

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Jenkinsfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ pipeline {
3030
}
3131
post {
3232
always {
33-
archiveArtifacts "Common/build/libs/hexdebug*.jar"
34-
archiveArtifacts "Fabric/build/libs/hexdebug*.jar"
35-
archiveArtifacts "Forge/build/libs/hexdebug*.jar"
33+
archiveArtifacts "build/jenkinsArtifacts/*"
3634
}
3735
}
3836
}

plugins/src/main/kotlin/hexdebug/conventions/architectury.gradle.kts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,12 @@ sourceSets {
5252
}
5353

5454
tasks {
55-
register<Copy>("exportPrerelease") {
56-
dependsOn(remapJar)
57-
from(remapJar.flatMap { it.archiveFile })
58-
into(rootDir.toPath() / "dist")
55+
val jenkinsArtifacts = register<Copy>("jenkinsArtifacts") {
56+
from(remapJar, remapSourcesJar, get("javadocJar"))
57+
into(rootDir.toPath() / "build" / "jenkinsArtifacts")
58+
}
5959

60-
// TODO: this should really use jenkins' build number, if/when we move there
61-
val sha = providers.environmentVariable("GITHUB_SHA").map { it.take(10) }
62-
rename { filename ->
63-
if (sha.isPresent) {
64-
val base = filename.removeSuffix(".jar")
65-
"$base-${sha.get()}.jar"
66-
} else filename
67-
}
60+
build {
61+
dependsOn(jenkinsArtifacts)
6862
}
6963
}

0 commit comments

Comments
 (0)