laviua/komock

View on GitHub
komock-app/build.gradle

Summary

Maintainability
Test Coverage
group 'ua.com.lavi'
apply plugin: 'application'
apply plugin: 'kotlin'

buildscript {
    ext.kotlin_version = '1.2.51'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}


sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}
repositories {
    mavenCentral()
}
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

processResources {
    filesMatching('**/*.properties') {
        filter {
            it.replace('${projectVersion}', project.version)
        }
    }
}

mainClassName = 'ua.com.lavi.komock.app.KomockApplication'

dependencies {
    compile project(':komock-core')
    compile "ch.qos.logback:logback-classic:1.1.7"
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}

task fatJar(type: Jar) {
    manifest {
        attributes 'Implementation-Title': 'Komock Application',
                'Implementation-Version': version,
                'Main-Class': mainClassName
    }
    baseName = project.name + '-fat'
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}