apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: "kotlin-spring"
apply plugin: 'org.springframework.boot'

jar {
    baseName = 'json2kotlin'
    version = '0.3.0'
    manifest {
        attributes 'Main-Class': 'AppKt'
    }
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}

springBoot {
    mainClass = 'com.fractalwrench.json2kotlin.AppKt'
}

buildscript {
    ext.spring_boot_version = '1.5.4.RELEASE'
    repositories {
        jcenter()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:$spring_boot_version"
    }
}

repositories {
    jcenter()
}

dependencies {
    compile project(":core")
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    compile("org.springframework.boot:spring-boot-starter-thymeleaf")
    compile("org.springframework.boot:spring-boot-starter-actuator")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.squareup:kotlinpoet:0.7.0'
    compile 'com.bugsnag:bugsnag:3.1.4'
}
