buildscript {
    ext {
        kotlinVersion = '1.0.6'
        springBootVersion = '1.5.2.RELEASE'
    }
    repositories {
        mavenCentral()
//        maven {
//          url "https://plugins.gradle.org/m2/"
//        }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
        classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
//        classpath "gradle.plugin.org.jlleitschuh.gradle:ktlint-gradle:1.0.2"
    }
}

plugins {
  id "org.jlleitschuh.gradle.ktlint" version "1.0.2"
}

apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
//apply plugin: "org.jlleitschuh.gradle.ktlint"



jar {
    baseName = 'api'
    version = '0.0.1-SNAPSHOT'
}

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'javax.transaction', name: 'javax.transaction-api', version: '1.2'
    compile group: 'javax.ejb', name: 'javax.ejb-api', version: '3.2'
    compile group: 'commons-codec', name: 'commons-codec', version: '1.5'
    compile('org.springframework.boot:spring-boot-starter-actuator')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-data-rest')
    compile('org.springframework.boot:spring-boot-starter-security')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
    compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
    runtime('org.springframework.boot:spring-boot-devtools')
    runtime('org.postgresql:postgresql')
    testCompile('com.pholser:junit-quickcheck-core:0.8-alpha-3')
    testCompile('com.pholser:junit-quickcheck-generators:0.8-alpha-3')
    testCompile('org.springframework.boot:spring-boot-starter-test')
    runtime group: 'com.h2database', name: 'h2', version: '1.4.195'
}
