import nerd.tuxmobil.fahrplan.congress.Plugins
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

buildscript {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
    dependencies {
        classpath Plugins.android
        classpath Plugins.composeCompiler
        classpath Plugins.dexcount
        classpath Plugins.kotlin
        classpath Plugins.ksp
        classpath Plugins.sonarQube
        classpath Plugins.unMock
        classpath Plugins.versions
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}

subprojects {
    tasks.withType(Test).configureEach {
        useJUnitPlatform()
        testLogging {
            events TestLogEvent.FAILED,
                    TestLogEvent.PASSED,
                    TestLogEvent.SKIPPED,
                    TestLogEvent.STANDARD_ERROR,
                    TestLogEvent.STANDARD_OUT
            exceptionFormat TestExceptionFormat.FULL
            showCauses true
            showExceptions true
            showStackTraces true
        }
    }
}

apply from: "gradle/versions.gradle"
