Skip to content

Commit

Permalink
Simplify build properties (#2370)
Browse files Browse the repository at this point in the history
- Remove redundant `forceCodyBuild` variable, use `forceAgentBuild`
- Remove undocumented `forceBuild` variable

## Test plan

```
./gradlew buildPlugin -PforceAgentBuild=true
./gradlew buildPlugin -PforceAgentBuild=true
```

and verify that the Cody step, ` pnpm run -s build:root && pnpm run -s
build:webviews && pnpm run -s build:agent`, runs both times.
  • Loading branch information
dominiccooney authored Oct 2, 2024
1 parent 2e3082f commit 18be103
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

fun properties(key: String) = project.findProperty(key)?.toString()

val isForceBuild = properties("forceBuild") == "true"
val isForceAgentBuild =
isForceBuild ||
properties("forceCodyBuild") == "true" ||
properties("forceAgentBuild") == "true"
val isForceCodeSearchBuild = isForceBuild || properties("forceCodeSearchBuild") == "true"
val isForceAgentBuild = properties("forceAgentBuild") == "true"
val isForceCodeSearchBuild = properties("forceCodeSearchBuild") == "true"

// As https://www.jetbrains.com/updates/updates.xml adds a new "IntelliJ IDEA" YYYY.N version, add
// it to this list.
Expand Down

0 comments on commit 18be103

Please sign in to comment.