Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(infra): fix reading of build_snapshot_train gradlew property. #3326

Merged
merged 1 commit into from Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle.kts
Expand Up @@ -16,10 +16,10 @@ buildscript {
* Additionally, mavenLocal and Sonatype snapshots are added to repository list and stress tests are disabled.
* DO NOT change the name of these properties without adapting kotlinx.train build chain.
*/
extra["build_snapshot_train"] = rootProject.properties["build_snapshot_train"].let { it != null && it != "" }
val build_snapshot_train: Boolean by extra
extra["build_snapshot_train"] = rootProject.properties["build_snapshot_train"]
val build_snapshot_train: String? by extra

if (build_snapshot_train) {
if (build_snapshot_train?.toBoolean() == true) {
extra["kotlin_version"] = rootProject.properties["kotlin_snapshot_version"]
val kotlin_version: String? by extra
if (kotlin_version == null) {
Expand Down
11 changes: 6 additions & 5 deletions buildSrc/src/main/kotlin/Train.kt
Expand Up @@ -6,8 +6,8 @@ import org.gradle.api.tasks.testing.*
import org.gradle.kotlin.dsl.*

fun Project.filterSnapshotTests() {
val build_snapshot_train: Boolean by extra
if (!build_snapshot_train) return
val build_snapshot_train: String? by extra
if (build_snapshot_train?.toBoolean() != true) return

println("Hacking test tasks, removing stress and flaky tests")
subprojects {
Expand Down Expand Up @@ -47,9 +47,10 @@ fun Project.filterSnapshotTests() {

fun Project.setupTrainForSubproject() {
if (COMMON_JVM_ONLY) return

val build_snapshot_train: Boolean? by extra
if (build_snapshot_train != true) return
val build_snapshot_train: String? by extra
if (build_snapshot_train?.toBoolean() != true) {
return
}

val atomicfu_version: String by extra
val coroutines_version: String by extra
Expand Down