Skip to content

Commit

Permalink
Only run misk-admin:buildMiskWeb on CI or if specifically
Browse files Browse the repository at this point in the history
requested

GitOrigin-RevId: d15efa35e179e442a4df30d55c664b5b14f077da
  • Loading branch information
yissachar authored and svc-squareup-copybara committed Jul 30, 2024
1 parent c6e2300 commit 20eb968
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions misk-admin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ val buildMiskWeb = tasks.register("buildMiskWeb", MiskWebBuildTask::class.java)
outputFiles.setFrom(outputs)
}

tasks.named { it == "explodeCodeSourceMain" }.configureEach {
dependsOn(buildMiskWeb)
}

tasks.named("processResources").configure {
dependsOn(buildMiskWeb)
// buildMiskWeb is expensive and generally not needed locally. Only build it on CI, or if
// specifically requested.
val isCi = System.getenv("CI") == "true" || System.getenv("GITHUB_ACTIONS") != null
if (isCi || System.getProperty("misk.admin.buildMiskWeb") == "true") {
tasks.named { it == "explodeCodeSourceMain" || it == "processResources" }.configureEach {
dependsOn(buildMiskWeb)
}
}

sourceSets {
Expand Down

0 comments on commit 20eb968

Please sign in to comment.