From 5225f7547f58d6a6251f185ea59baf53916a3bbb Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Sat, 18 Nov 2023 00:13:28 +0100 Subject: [PATCH] add ./gradlew ctng and ./gradlew ctg (#5380) --- build.gradle.kts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b3ef0a51123..618ee61cf18 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ import JapiCmp.configureJapiCmp +import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeHostTest plugins { id("build.logic") apply false @@ -77,7 +78,7 @@ tasks.register("ciTestsNoGradle") { } dependsOn(tasks.matching { it.name == "jvmTest" }) dependsOn(tasks.matching { it.name == "jsIrTest" }) - dependsOn(tasks.matching { it.name == "macosX64Test" }) + dependsOn(tasks.withType(KotlinNativeHostTest::class.java)) dependsOn(tasks.matching { it.name == "apiCheck" }) } @@ -90,10 +91,22 @@ tasks.register("ciTestsNoGradle") { dependsOn(":apollo-normalized-cache-sqlite-incubating:generateCommonMainBlob2DatabaseSchema") doLast { - checkGitStatus() + if (isCIBuild()) { + checkGitStatus() + } } } +/** + * Shorthands for less typing during development + */ +tasks.register("ctng") { + dependsOn("ciTestsNoGradle") +} +tasks.register("ctg") { + dependsOn("ciTestsGradle") +} + val ciBuild = tasks.register("ciBuild") { description = "Execute the 'build' task in each subproject" dependsOn(subprojectTasks("build"))