Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloox committed Sep 17, 2020
2 parents 3a13f3b + feecdc9 commit e00ec47
Show file tree
Hide file tree
Showing 42 changed files with 371 additions and 490 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/flank-scripts-macos_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ jobs:
- name: Gradle check
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./flank-scripts/gradlew"
arguments: "-p flank-scripts check"
arguments: ":flank-scripts:check"
15 changes: 6 additions & 9 deletions .github/workflows/macos_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,22 @@ jobs:
- name: Gradle clean build
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner clean build"
arguments: "clean build"

- name: Prepare Google Service Account
env:
GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }}
run: |
GCLOUD_DIR="$HOME/.config/gcloud/"
mkdir -p "$GCLOUD_DIR"
echo "$GCLOUD_KEY" | base64 --decode > "$GCLOUD_DIR/application_default_credentials.json"
echo "$GCLOUD_KEY" | base64 --decode > "$GCLOUD_DIR/application_default_credentials.json"
- name: Gradle Integration Tests Android
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./integration_tests/gradlew"
arguments: "--info -p integration_tests test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"

arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"

- name: Gradle Integration Tests iOS
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./integration_tests/gradlew"
arguments: "--info -p integration_tests test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ jobs:
- name: Gradle Build Flank
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner clean build shadowJar"

arguments: "clean test_runner:build test_runner:shadowJar"

- name: Gradle Upload to bintray
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner bintrayUpload -PJFROG_API_KEY=${{ secrets.JFROG_API_KEY }} -PJFROG_USER=${{ secrets.JFROG_USER }}"
arguments: "test_runner:bintrayUpload -PJFROG_API_KEY=${{ secrets.JFROG_API_KEY }} -PJFROG_USER=${{ secrets.JFROG_USER }}"

- name: Authenticate to hub
run: |
Expand Down Expand Up @@ -107,8 +105,7 @@ jobs:
uses: eskatos/gradle-command-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner publish -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
arguments: "test_runner:publish -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"

- name: Post Message of Flank Release
uses: Flank/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release_notes_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
- name: Generate documentation
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner processCliAsciiDoc"
arguments: "test_runner:processCliAsciiDoc"

- name: Gradle Build flankScripts and add it to PATH
run: |
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/ubuntu-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
- name: Gradle clean build
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner clean build"
arguments: "clean build"

- name: Prepare Google Service Account
env:
Expand All @@ -46,13 +45,10 @@ jobs:
- name: Gradle Integration Tests Android
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./integration_tests/gradlew"
arguments: "--info -p integration_tests test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"

arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"
- name: Gradle Integration Tests iOS
uses: eskatos/gradle-command-action@v1
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
gradle-executable: "./integration_tests/gradlew"
arguments: "--info -p integration_tests test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ app, test, and xctestrun-file support `~`, environment variables, and globs (*,

Run `test_runner/flank.ios.yml` with flank to verify iOS execution is working.

- `cd test_runner/`
- `./gradlew clean build shadowJar`
- `java -jar ./build/libs/flank-*.jar firebase test ios run`
- `./gradlew clean test_runner:build test_runner:shadowJar`
- `java -jar ./test_runner/build/libs/flank-*.jar firebase test ios run`

```yaml
# gcloud args match the official gcloud cli
Expand Down Expand Up @@ -226,9 +225,8 @@ flank:

Run `test_runner/flank.yml` with flank to verify Android execution is working.

- `cd test_runner/`
- `./gradlew clean build shadowJar`
- `java -jar ./build/libs/flank-*.jar firebase test android run`
- `./gradlew clean test_runner:build test_runner:shadowJar`
- `java -jar ./test_runner/build/libs/flank-*.jar firebase test android run`

```yaml
# gcloud args match the official gcloud cli
Expand Down
11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


// Fix Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.hash.Hashing.crc32c()Lcom/google/common/hash/HashFunction;
// https://stackoverflow.com/a/45286710
configurations.all {
resolutionStrategy {
force("com.google.guava:guava:25.1-jre")
force(Libs.KOTLIN_REFLECT)
exclude(group = "com.google.guava", module = "guava-jdk5")
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ object Versions {

// https://github.com/ben-manes/gradle-versions-plugin/releases
const val BEN_MANES = "0.28.0"


// ============== flank-scripts ==============
const val KOTLINX_SERIALIZATION = "1.0.0-RC"
const val FUEL = "2.2.3"
const val CLIKT = "2.8.0"
}

object Libs {
Expand Down Expand Up @@ -136,4 +142,23 @@ object Libs {
//endregion

const val COMMON_TEXT = "org.apache.commons:commons-text:${Versions.COMMON_TEXT}"
const val KOTLIN_SERIALIZATION = "org.jetbrains.kotlinx:kotlinx-serialization-core:${Versions.KOTLINX_SERIALIZATION}"

//region flank-scripts
const val PLUGIN_SHADOW_JAR = "com.github.johnrengelman.shadow"
const val CLIKT = "com.github.ajalt:clikt:${Versions.CLIKT}"
const val DETEKT_PLUGIN = "io.gitlab.arturbosch.detekt"
//endregion

object Fuel {
const val CORE = "com.github.kittinunf.fuel:fuel:${Versions.FUEL}"
const val COROUTINES = "com.github.kittinunf.fuel:fuel-coroutines:${Versions.FUEL}"
const val KOTLINX_SERIALIZATION = "com.github.kittinunf.fuel:fuel-kotlinx-serialization:${Versions.FUEL}"
}
}

object Kotlin {
const val PLUGIN_JVM = "jvm"
const val PLUGIN_SERIALIZATION = "plugin.serialization"
}

2 changes: 1 addition & 1 deletion flank-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository contains helper scripts for developing flank. For now, it contai

To build flank-scripts:
1. Run script `buildFlankScripts.sh` in `flank-scripts/bash/` directory
2. Run command `flank-scripts/gradlew clean assemble shadowJar` and manual copy file from `/flank-scripts/build/libs/flankScripts.jar` to `flank-scripts/bash/`
2. Run command `./gradlew clean flank-scripts:assemble flank-scripts:shadowJar` and manual copy file from `/flank-scripts/build/libs/flankScripts.jar` to `flank-scripts/bash/`
3. You could always run/build it from Intellij IDEA

### Usage
Expand Down
2 changes: 1 addition & 1 deletion flank-scripts/bash/buildFlankScripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ DIR=`dirname "$BASH_SOURCE"`

FLANK_SCRIPTS="$DIR/.."

"$FLANK_SCRIPTS/gradlew" -p "$FLANK_SCRIPTS" clean assemble shadowJar
"$FLANK_SCRIPTS/../gradlew" flank-scripts:clean flank-scripts:assemble flank-scripts:shadowJar
cp "$FLANK_SCRIPTS"/build/libs/flankScripts.jar "$DIR/flankScripts.jar"
30 changes: 15 additions & 15 deletions flank-scripts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
application
kotlin(Kotlin.PLUGIN_JVM) version Versions.KOTLIN_VERSION
kotlin(Kotlin.PLUGIN_SERIALIZATION) version Versions.KOTLIN_VERSION
id(PLUGIN_SHADOW_JAR) version Versions.SHADOW_JAR
id(DETEKT_PLUGIN) version Versions.DETEKT
kotlin(Kotlin.PLUGIN_JVM) version Versions.KOTLIN
kotlin(Kotlin.PLUGIN_SERIALIZATION) version Versions.KOTLIN
id(Libs.PLUGIN_SHADOW_JAR) version Versions.SHADOW
id(Libs.DETEKT_PLUGIN) version Versions.DETEKT
}

val artifactID = "flankScripts"
Expand Down Expand Up @@ -51,17 +51,17 @@ detekt {
tasks["check"].dependsOn(tasks["detekt"])

dependencies {
implementation(kotlin("stdlib"))
implementation(Kotlin.KOTLIN_SERIALIZATION)
implementation(Fuel.CORE)
implementation(Fuel.KOTLINX_SERIALIZATION)
implementation(Fuel.COROUTINES)
implementation(CLIKT)
implementation(kotlin("stdlib", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION)) // or "stdlib-jdk8"
implementation(Libs.KOTLIN_SERIALIZATION)
implementation(Libs.Fuel.CORE)
implementation(Libs.Fuel.KOTLINX_SERIALIZATION)
implementation(Libs.Fuel.COROUTINES)
implementation(Libs.CLIKT)

detektPlugins(DETEKT_FORMATTING)
detektPlugins(Libs.DETEKT_FORMATTING)

testImplementation(JUNIT)
testImplementation(MOCKK)
testImplementation(TRUTH)
testImplementation(SYSTEM_RULES)
testImplementation(Libs.JUNIT)
testImplementation(Libs.MOCKK)
testImplementation(Libs.TRUTH)
testImplementation(Libs.SYSTEM_RULES)
}
21 changes: 0 additions & 21 deletions flank-scripts/buildSrc/src/main/kotlin/Dependencies.kt

This file was deleted.

17 changes: 0 additions & 17 deletions flank-scripts/buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

Loading

0 comments on commit e00ec47

Please sign in to comment.