Skip to content

Commit

Permalink
Merge pull request #954 from wordhou/migrate-samples-to-kotlin-dsl
Browse files Browse the repository at this point in the history
Migrate samples to kotlin dsl
  • Loading branch information
robstoll authored Jul 13, 2021
2 parents bfe04f4 + 3a7c9cd commit c9acc13
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 204 deletions.
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
}
}
File renamed without changes.
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

0 comments on commit c9acc13

Please sign in to comment.