Skip to content

Commit

Permalink
Switched release flag instead of prod
Browse files Browse the repository at this point in the history
  • Loading branch information
germanosin committed Jan 29, 2025
1 parent 808807e commit 436904b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage

dependencies {
implementation project(":contract")
if (prod) {
if (includeFrontend) {
implementation project(":frontend")
}
implementation project(":serde-api")
Expand Down Expand Up @@ -119,7 +119,7 @@ test {
useJUnitPlatform()
}

tasks.register('buildDockerImage', DockerBuildImage) {
tasks.register('buildDockerImageTask', DockerBuildImage) {
inputDir = projectDir
dockerFile = project.layout.projectDirectory.file('Dockerfile')
buildArgs = [
Expand All @@ -128,6 +128,6 @@ tasks.register('buildDockerImage', DockerBuildImage) {
images.add("ghcr.io/kafbat/kafka-ui:${project.version}")
}

if (prod) {
tasks.build.finalizedBy buildDockerImage
if (buildDockerImages) {
tasks.build.finalizedBy buildDockerImageTask
}
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ boolean resolveBooleanProperty(String propertyName, boolean defaultValue = false
}

ext {
prod = resolveBooleanProperty("prod")
release = resolveBooleanProperty("release")
includeFrontend = resolveBooleanProperty("include-frontend", release)
buildDockerImages = resolveBooleanProperty("build-docker-images", release)
e2eHeadlessOff = resolveBooleanProperty("e2e-headless-off")
e2eSelenoidOff = resolveBooleanProperty("e2e-selenoid-off")
}

if (prod) { // TODO shouldn't be prod, 'publish' instead?
if (release) {
nexusPublishing {
repositories {
sonatype {
Expand Down
4 changes: 2 additions & 2 deletions serde-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ artifacts {
archives sourceJar, javadocJar
}

if (prod) { // TODO shouldn't be prod, 'publish' instead?
if (release) {
signing {
sign(publishing.publications)
}
}

publishing {
if (prod) { // TODO shouldn't be prod, 'publish' instead?
if (release) { // TODO shouldn't be prod, 'publish' instead?
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
Expand Down

0 comments on commit 436904b

Please # to comment.