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

Migrate samples to kotlin dsl #954

Merged
merged 4 commits into from
Jul 13, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions samples/js/build.gradle

This file was deleted.

33 changes: 33 additions & 0 deletions samples/js/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Example project to show how to use Atrium in combination with mocha
// For more information on how to setup Atrium for a JS project -> https://github.com/robstoll/atrium#js

// for infix-api -> change to 'atrium-infix-en_GB-js'
val atriumApi = "atrium-fluent-en_GB-js"
val atriumVersion = "0.16.0"

repositories {
mavenCentral()
}

dependencies {
"implementation"("org.jetbrains.kotlin:kotlin-stdlib-js")

// setup for Atrium:
"testImplementation"("ch.tutteli.atrium:$atriumApi:$atriumVersion")

// setup for mocha:
"testImplementation"("org.jetbrains.kotlin:kotlin-test-js")
}

plugins {
kotlin("js") version "1.5.20"
}

group = "org.atriumlib.samples"
version = "0.0.1"

kotlin {
js {
nodejs()
}
}
File renamed without changes.
47 changes: 0 additions & 47 deletions samples/jvm/junit5/build.gradle

This file was deleted.

43 changes: 43 additions & 0 deletions samples/jvm/junit5/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Example project to show how to use Atrium in combination with JUnit5
// For more information on how to setup Atrium for a JVM project -> https://github.com/robstoll/atrium#jvm

import org.gradle.api.tasks.testing.logging.TestExceptionFormat

val atriumVersion = "0.16.0"
val junitVersion = "5.7.2"

plugins {
kotlin("jvm") version "1.5.20"
}

group = "org.atriumlib.samples"
version = "0.0.1"

repositories {
mavenCentral()
}

dependencies {
// junit5 requires jdk8, define dependency to stdlib-jdk at least in test
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

// setup for Atrium:
// for infix-api -> change artifact-id to 'atrium-infix-en_GB'
testImplementation("ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion")

// setup for junit5
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}

tasks.test {
useJUnitPlatform {
includeEngines("junit-jupiter")
}
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}
47 changes: 0 additions & 47 deletions samples/jvm/spek/build.gradle

This file was deleted.

43 changes: 43 additions & 0 deletions samples/jvm/spek/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Example project to show how to use Atrium in combination with Spek
// For more information on how to setup Atrium for a JVM project -> https://github.com/robstoll/atrium#jvm

import org.gradle.api.tasks.testing.logging.TestExceptionFormat

val atriumVersion = "0.16.0"
val spekVersion = "2.0.15"

plugins {
kotlin("jvm") version "1.5.20"
}

group = "org.atriumlib.samples"
version = "0.0.1"

repositories {
mavenCentral()
}

dependencies {
//spek requires jdk8, define dependency to stdlib-jdk at least in test
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

// setup for Atrium:
// for infix-api -> change artifact-id to 'atrium-infix-en_GB'
testImplementation("ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion")

// setup for 'spek', for some kotlin-version
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
}

tasks.test {
useJUnitPlatform {
includeEngines("spek2")
}
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}
2 changes: 0 additions & 2 deletions samples/jvm/spek/settings.gradle

This file was deleted.

2 changes: 2 additions & 0 deletions samples/jvm/spek/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = "atrium-spek"

70 changes: 0 additions & 70 deletions samples/multiplatform/build.gradle

This file was deleted.

Loading