plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.41' apply(false)
    id 'org.jetbrains.intellij' version '0.4.9' apply(false)
    id 'org.jmailen.kotlinter' version '1.26.0' apply(false)
    id 'org.sonarqube' version '2.7.1'
    id "io.gitlab.arturbosch.detekt" version '1.0.0-RC16'
}

allprojects {
    group = 'apollo'
    version = '0.0.1'

    repositories {
        mavenLocal()
        maven { url "https://repo.maven.apache.org/maven2" }
        maven { url "https://dl.bintray.com/kotlin/kotlinx/" }
    }
}

apply from: 'gradle/properties.gradle'
apply from: 'gradle/code-quality.gradle'
apply from: 'gradle/testing.gradle'
apply from: 'gradle/wrapper.gradle'

gradle.projectsEvaluated {
    task check {
        def deps = []
        deps += getTasksByName("check", true).findAll { it.project != rootProject }
        deps += "detekt"
        deps += jacocoReport

        dependsOn(deps)
    }
}