Skip to content

Commit

Permalink
Allow running Gradle tasks with -PskipKodex to publish locally faster
Browse files Browse the repository at this point in the history
  • Loading branch information
koperagen committed Jan 28, 2025
1 parent 33b5855 commit 87f6530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ idea {
// the target of `processKdocMain`, and they are returned to normal afterward.
// This is usually only done when publishing
val changeJarTask by tasks.creating {
outputs.upToDateWhen { false }
outputs.upToDateWhen { project.hasProperty("skipKodex") }
doFirst {
tasks.withType<Jar> {
doFirst {
Expand Down Expand Up @@ -266,7 +266,7 @@ tasks.withType<Jar> {

// modify all publishing tasks to depend on `changeJarTask` so the sources are swapped out with generated sources
tasks.configureEach {
if (name.startsWith("publish")) {
if (!project.hasProperty("skipKodex") && name.startsWith("publish")) {
dependsOn(processKDocsMain, changeJarTask)
}
}
Expand Down

0 comments on commit 87f6530

Please sign in to comment.