Skip to content

Commit 61c3a6c

Browse files
committed
exclude -jmh.jar from publishing
1 parent b07f5fc commit 61c3a6c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import ch.tutteli.gradle.plugins.publish.PublishPlugin
2+
13
//import kotlin.io.path.ExperimentalPathApi
24
//import kotlin.io.path.copyToRecursively
35

@@ -75,6 +77,20 @@ jmh {
7577
includes.set(project.findProperty("jmh.include")?.let { listOf(it.toString()) } ?: emptyList())
7678
}
7779

80+
ifIsPublishing {
81+
afterEvaluate {
82+
the<PublishingExtension>().run {
83+
publications {
84+
withType<MavenPublication>().configureEach {
85+
artifacts.removeIf {
86+
it.file.name.endsWith("-jmh.jar")
87+
}
88+
}
89+
}
90+
}
91+
}
92+
}
93+
7894
/*
7995
Release & deploy a commit
8096
--------------------------------

0 commit comments

Comments
 (0)