From fe8c7ca18dbbd07665dee57169dd6f89d92dd8d8 Mon Sep 17 00:00:00 2001 From: stewartbryson Date: Fri, 19 May 2023 19:43:13 +0000 Subject: [PATCH] Updating README and examples. --- README.md | 8 ++-- examples/groovy/build.gradle | 2 +- examples/java-external-stage/build.gradle | 2 +- examples/java-testing/build.gradle | 50 +++++++++++------------ examples/java/build.gradle | 2 +- examples/kotlin/build.gradle | 2 +- examples/scala/build.gradle | 7 ++-- 7 files changed, 37 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 0727e27..3f8da73 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ is automatically applied by the `snowflake` plugin: ```groovy plugins { id 'java' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } ``` @@ -234,7 +234,7 @@ Our `plugins` DSL from the build file: plugins { id 'java' id 'groovy' // needed for Spock testing framework - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } ``` @@ -299,7 +299,7 @@ The same applies for the topic of functional testing below. ### Functional Testing [Functional testing](https://en.wikipedia.org/wiki/Functional_testing) describes what the system does, and in my mind, this involves testing our deployed code in Snowflake. -Regardless of what we call it, we _know we need this_, and it's a crucial component in our build chain. +Regardless of what we call it, we _know we need this_ as a crucial component in our build chain. This plugin contains a custom Spock Specification class called `SnowflakeSpec` that can be used in a new test suite. By default, this test suite is called `functionalTest`, though the name can be configured using the `testSuite` property. @@ -311,7 +311,7 @@ functionalTest(JvmTestSuite) { all { useSpock('2.3-groovy-3.0') dependencies { - implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.13" + implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.14" } testTask.configure { failFast true diff --git a/examples/groovy/build.gradle b/examples/groovy/build.gradle index db68b27..d46e6ea 100644 --- a/examples/groovy/build.gradle +++ b/examples/groovy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'groovy' id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } repositories { diff --git a/examples/java-external-stage/build.gradle b/examples/java-external-stage/build.gradle index ded5909..5d739c3 100644 --- a/examples/java-external-stage/build.gradle +++ b/examples/java-external-stage/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } repositories { diff --git a/examples/java-testing/build.gradle b/examples/java-testing/build.gradle index a8b17ff..4e6f448 100644 --- a/examples/java-testing/build.gradle +++ b/examples/java-testing/build.gradle @@ -1,35 +1,35 @@ plugins { id 'java' id 'groovy' // needed for Spock testing framework - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' id 'com.adarshr.test-logger' version '3.2.0' // added for testing id 'com.github.ben-manes.versions' version '0.46.0' } repositories { - mavenCentral() - gradlePluginPortal() // added for functionalTest dependency + mavenCentral() + gradlePluginPortal() // added for functionalTest dependency } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 'upload' - // Explained in the Ephemeral Cloning section - useEphemeral = snowflake.isCI() // use ephemeral with CICD workflows - keepEphemeral = snowflake.isPR() // keep ephemeral for PRs - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 'upload' + // Explained in the Ephemeral Cloning section + useEphemeral = snowflake.isCI() // use ephemeral with CICD workflows + keepEphemeral = snowflake.isPR() // keep ephemeral for PRs + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } // Explained in the Testing section @@ -43,14 +43,14 @@ testing { all { useSpock('2.3-groovy-3.0') dependencies { - implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.13" + implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.14" } testTask.configure { failFast true // which SnowSQL connection to use systemProperty 'connection', snowflake.connection // if this is ephemeral, the test spec needs the name to connect to - if (project.snowflake.useEphemeral) { + if (snowflake.useEphemeral) { systemProperty 'ephemeralName', snowflake.ephemeralName } } @@ -60,13 +60,13 @@ testing { } } -version = '0.1.0' +version='0.1.0' // empty task for matrix strategy execution in GitHub Actions // please ignore afterEvaluate { - tasks.register('matrixStrategy') { - description 'Empty task for matrix strategy execution in GitHub Actions.' - dependsOn functionalTest - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn functionalTest + } } diff --git a/examples/java/build.gradle b/examples/java/build.gradle index 6ec21f5..ddc95dc 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } repositories { diff --git a/examples/kotlin/build.gradle b/examples/kotlin/build.gradle index dc5376f..3dfffc7 100644 --- a/examples/kotlin/build.gradle +++ b/examples/kotlin/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.jetbrains.kotlin.jvm" version "1.8.21" id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } repositories { diff --git a/examples/scala/build.gradle b/examples/scala/build.gradle index 01027f2..37b5f37 100644 --- a/examples/scala/build.gradle +++ b/examples/scala/build.gradle @@ -1,7 +1,7 @@ plugins { id 'scala' id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '2.0.13' + id 'io.github.stewartbryson.snowflake' version '2.0.14' } repositories { @@ -18,8 +18,6 @@ java { } } -version='0.1.0' - snowflake { connection = 'gradle_plugin' stage = 'upload' @@ -32,6 +30,9 @@ snowflake { } } +version='0.1.0' + + // empty task for matrix strategy execution in GitHub Actions // please ignore afterEvaluate {