plugins {
    id "org.jetbrains.kotlin.jvm"
    id "org.springframework.boot" version "3.5.6"
    id "org.graalvm.buildtools.native" version "0.11.1"
}

apply plugin: "io.freefair.aspectj.post-compile-weaving"
apply plugin: 'kotlin'
apply plugin: "java"
apply plugin: "io.freefair.lombok"
apply plugin: "jacoco"
apply plugin: "groovy"


repositories {
    mavenCentral()
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}

sourceSets {
    foo //https://github.com/freefair/gradle-plugins/issues/329
}

dependencies {
    aspect project(":aspectj:aspect")
    aspect 'org.aspectj:aspectjtools:1.9.24'

    implementation "org.slf4j:slf4j-api:2.+"

    implementation "org.springframework.boot:spring-boot-starter:3.5.6"

    implementation "org.aspectj:aspectjrt:1.9.24"
    implementation localGroovy()

    testImplementation "junit:junit:4.13.2"
    implementation "org.springframework.boot:spring-boot-starter-test:3.5.6"
}

configurations.testImplementation.extendsFrom(configurations.jacocoAnt)

tasks.named("compileJava").configure {
    ajc {
        options {
            compilerArgs += "-showWeaveInfo"
        }
    }
}

testing {
    suites {
        integrationTest(JvmTestSuite) {
            dependencies {
                implementation project()
            }
        }
    }
}

tasks.named('check') {
    dependsOn(testing.suites.integrationTest)
}
