Skip to content

Commit

Permalink
Convert all code to Kotlin.
Browse files Browse the repository at this point in the history
  • Loading branch information
cstroe committed Dec 14, 2018
1 parent 1ea823d commit c894dca
Show file tree
Hide file tree
Showing 36 changed files with 692 additions and 750 deletions.
47 changes: 29 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ plugins {
id("com.gradle.build-scan") version "2.0.2"
id("org.springframework.boot") version "2.1.1.RELEASE"
kotlin("jvm") version "1.3.11"
// https://kotlinlang.org/docs/reference/compiler-plugins.html#spring-support
id("org.jetbrains.kotlin.plugin.spring") version "1.3.11"
// https://kotlinlang.org/docs/reference/compiler-plugins.html#jpa-support
id("org.jetbrains.kotlin.plugin.jpa") version "1.3.11"
}

repositories {
Expand Down Expand Up @@ -38,6 +42,10 @@ sourceSets {
}
}

tasks.test {
useJUnitPlatform()
}

val integrationTestImplementation by configurations.getting {
extendsFrom(configurations.testImplementation.get())
}
Expand All @@ -54,50 +62,53 @@ val integrationTest = task<Test>("integrationTest") {
}

dependencies {
// Kotlin
compile(kotlin("stdlib-jdk8"))

// Spring Boot
implementation(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:2.1.1.RELEASE"))
compile(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:2.1.1.RELEASE"))

// web
implementation("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-web")

// database
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.hibernate:hibernate-java8")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.hibernate:hibernate-java8")
runtime("org.postgresql:postgresql:42.2.2")
implementation("org.flywaydb:flyway-core:5.0.7")
compile("org.flywaydb:flyway-core:5.0.7")

implementation("org.bitbucket.cowwoc:requirements-core:4.0.4-RC")
compile("org.bitbucket.cowwoc:requirements-core:4.0.4-RC")

// Jackson
implementation("com.fasterxml.jackson.core:jackson-databind:2.9.7")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.7")
compile("com.fasterxml.jackson.core:jackson-databind:2.9.7")
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.7")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.7")

// because of Java 9+
// https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j#43574427
// https://blog.sourced-bvba.be/article/2017/12/17/java9-spring/
implementation("javax.xml.bind:jaxb-api:2.3.0")
implementation("com.sun.xml.bind:jaxb-impl:2.3.0")
implementation("org.glassfish.jaxb:jaxb-runtime:2.3.0")
implementation("javax.activation:activation:1.1.1")
compile("javax.xml.bind:jaxb-api:2.3.0")
compile("com.sun.xml.bind:jaxb-impl:2.3.0")
compile("org.glassfish.jaxb:jaxb-runtime:2.3.0")
compile("javax.activation:activation:1.1.1")

// dev tools
implementation("org.springframework.boot:spring-boot-devtools")
compile("org.springframework.boot:spring-boot-devtools")

testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-test-autoconfigure")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.springframework.boot:spring-boot-test-autoconfigure")

// JUnit 5
testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.2")
testCompile("org.junit.jupiter:junit-jupiter-api:5.3.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.3.2")

// Support running JUnit 4 tests using JUnit 5
testCompileOnly("junit:junit:4.12")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.3.2")

// H2 in-memory database
testImplementation("com.h2database:h2:1.4.197")
testCompile("com.h2database:h2:1.4.197")

// integrationTestCompile("org.seleniumhq.selenium:selenium-java:3.13.0")
// integrationTestCompile("org.seleniumhq.selenium:selenium-remote-driver:3.13.0")
compile(kotlin("stdlib-jdk8"))
}
73 changes: 0 additions & 73 deletions src/integrationTest/java/cloud/cosmin/checklister/BaseIT.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions src/integrationTest/java/cloud/cosmin/checklister/LoginTest.java

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit c894dca

Please sign in to comment.