diff --git a/.github/workflows/gradle-pr.yml b/.github/workflows/gradle-pr.yml index d72fab1..69b021e 100644 --- a/.github/workflows/gradle-pr.yml +++ b/.github/workflows/gradle-pr.yml @@ -14,15 +14,15 @@ jobs: steps: - uses: actions/checkout@v3 -# - id: echo_environment -# run: ./echo-environment.sh -# name: "Echo environment" -# shell: bash + # - id: echo_environment + # run: ./echo-environment.sh + # name: "Echo environment" + # shell: bash - id: gradle_properties run: | - mkdir -p $HOME/.gradle - echo "$GRADLE_PROPERTIES" > $HOME/.gradle/gradle.properties + mkdir -p $HOME/.gradle + echo "$GRADLE_PROPERTIES" > $HOME/.gradle/gradle.properties name: 'Write gradle.properties file' shell: bash env: @@ -30,8 +30,8 @@ jobs: - id: snowsql_config run: | - mkdir -p $HOME/.snowsql - echo "$SNOW_CONFIG" > $HOME/.snowsql/config + mkdir -p $HOME/.snowsql + echo "$SNOW_CONFIG" > $HOME/.snowsql/config name: 'Write .snowsql/config file' shell: bash env: @@ -63,7 +63,7 @@ jobs: strategy: matrix: - directory: [java-manual, java, java-testing, groovy, scala, kotlin] + directory: [ java-manual, java, java-testing, groovy, scala, kotlin ] #directory: [java] steps: diff --git a/build.gradle b/build.gradle index 79972d9..4b47076 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "com.github.ben-manes.versions" version "0.46.0" - id "pl.allegro.tech.build.axion-release" version "1.15.1" + id "pl.allegro.tech.build.axion-release" version "1.15.3" id "com.github.breadmoirai.github-release" version "2.4.1" id "build-dashboard" id 'idea' diff --git a/src/examples/groovy/build.gradle b/src/examples/groovy/build.gradle index 86fa2ac..a41e3ab 100644 --- a/src/examples/groovy/build.gradle +++ b/src/examples/groovy/build.gradle @@ -1,42 +1,42 @@ plugins { - id 'groovy' - id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '@version@' + id 'groovy' + id 'com.github.ben-manes.versions' version '0.46.0' + id 'io.github.stewartbryson.snowflake' version '@version@' } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation 'org.codehaus.groovy:groovy:3.0.17' + implementation 'org.codehaus.groovy:groovy:3.0.17' } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 'upload' - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 'upload' + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } -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 snowflakeJvm - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn snowflakeJvm + } } diff --git a/src/examples/java-external-stage/build.gradle b/src/examples/java-external-stage/build.gradle index 920703a..9efa7cc 100644 --- a/src/examples/java-external-stage/build.gradle +++ b/src/examples/java-external-stage/build.gradle @@ -1,40 +1,40 @@ plugins { - id 'java' - id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '@version@' + id 'java' + id 'com.github.ben-manes.versions' version '0.46.0' + id 'io.github.stewartbryson.snowflake' version '@version@' } repositories { - mavenCentral() + mavenCentral() } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 's3_maven' - groupId = 'io.github.stewartbryson' - artifactId = 'sample-udfs' - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 's3_maven' + groupId = 'io.github.stewartbryson' + artifactId = 'sample-udfs' + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } -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 snowflakeJvm - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn snowflakeJvm + } } diff --git a/src/examples/java-testing/build.gradle b/src/examples/java-testing/build.gradle index 2a6ad87..98db002 100644 --- a/src/examples/java-testing/build.gradle +++ b/src/examples/java-testing/build.gradle @@ -1,72 +1,72 @@ plugins { - id 'java' - id 'groovy' // needed for Spock testing framework - id 'io.github.stewartbryson.snowflake' version '@version@' - id 'com.adarshr.test-logger' version '3.2.0' // added for testing - id 'com.github.ben-manes.versions' version '0.46.0' + id 'java' + id 'groovy' // needed for Spock testing framework + id 'io.github.stewartbryson.snowflake' version '@version@' + 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 CI/CD 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 CI/CD 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 testing { - suites { - test { - useSpock('2.3-groovy-3.0') - } - functionalTest(JvmTestSuite) { - targets { - all { - useSpock('2.3-groovy-3.0') - dependencies { - implementation "io.github.stewartbryson:gradle-snowflake-plugin:@version@" - } - 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 (snowflake.useEphemeral) { - systemProperty 'ephemeralName', snowflake.ephemeralName - } - } - } + suites { + test { + useSpock('2.3-groovy-3.0') + } + functionalTest(JvmTestSuite) { + targets { + all { + useSpock('2.3-groovy-3.0') + dependencies { + implementation "io.github.stewartbryson:gradle-snowflake-plugin:@version@" + } + 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 (snowflake.useEphemeral) { + systemProperty 'ephemeralName', snowflake.ephemeralName + } + } } - } - } + } + } + } } -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, dropEphemeral - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn functionalTest, dropEphemeral + } } diff --git a/src/examples/java/build.gradle b/src/examples/java/build.gradle index e6ecfa9..17d3e59 100644 --- a/src/examples/java/build.gradle +++ b/src/examples/java/build.gradle @@ -1,38 +1,38 @@ plugins { - id 'java' - id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '@version@' + id 'java' + id 'com.github.ben-manes.versions' version '0.46.0' + id 'io.github.stewartbryson.snowflake' version '@version@' } repositories { - mavenCentral() + mavenCentral() } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 'upload' - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 'upload' + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } -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 snowflakeJvm - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn snowflakeJvm + } } diff --git a/src/examples/kotlin/build.gradle b/src/examples/kotlin/build.gradle index 3c786f1..332801c 100644 --- a/src/examples/kotlin/build.gradle +++ b/src/examples/kotlin/build.gradle @@ -1,39 +1,39 @@ 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 '@version@' + 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 '@version@' } repositories { - mavenCentral() + mavenCentral() } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 'upload' - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 'upload' + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } -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 snowflakeJvm - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn snowflakeJvm + } } diff --git a/src/examples/scala/build.gradle b/src/examples/scala/build.gradle index d8f4a22..b128b1b 100644 --- a/src/examples/scala/build.gradle +++ b/src/examples/scala/build.gradle @@ -1,43 +1,43 @@ plugins { - id 'scala' - id 'com.github.ben-manes.versions' version '0.46.0' - id 'io.github.stewartbryson.snowflake' version '@version@' + id 'scala' + id 'com.github.ben-manes.versions' version '0.46.0' + id 'io.github.stewartbryson.snowflake' version '@version@' } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation 'org.scala-lang:scala-library:2.13.10' + implementation 'org.scala-lang:scala-library:2.13.10' } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } } snowflake { - connection = 'gradle_plugin' - stage = 'upload' - applications { - add_numbers { - inputs = ["a integer", "b integer"] - returns = "string" - handler = "Sample.addNum" - } - } + connection = 'gradle_plugin' + stage = 'upload' + applications { + add_numbers { + inputs = ["a integer", "b integer"] + returns = "string" + handler = "Sample.addNum" + } + } } -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 snowflakeJvm - } + tasks.register('matrixStrategy') { + description 'Empty task for matrix strategy execution in GitHub Actions.' + dependsOn snowflakeJvm + } }