plugins {
    id("gradlebuild.distribution.implementation-java")
    id("java-test-fixtures")
}

description = "Domain object collection infrastructure: DefaultDomainObjectCollection hierarchy, element sources, and collection event system."

dependencies {
    api(projects.baseServices)
    api(projects.buildOperations)
    api(projects.coreApi)
    api(projects.declarativeDslApi)
    api(projects.modelCore)
    api(projects.serviceLookup)
    api(projects.serviceProvider)
    api(projects.stdlibJavaExtensions)

    api(libs.groovy)
    api(libs.guava)
    api(libs.jspecify)

    implementation(projects.baseServicesGroovy)
    implementation(projects.enterpriseOperations)
    implementation(projects.functional)
    implementation(projects.logging)

    implementation(libs.fastutil)

    testFixturesImplementation(projects.internalIntegTesting)
    testFixturesImplementation(projects.internalTesting)
    testFixturesImplementation(projects.modelCore)
    testFixturesImplementation(testFixtures(projects.buildOperations))
    testFixturesImplementation(testFixtures(projects.core))

    testImplementation(projects.internalTesting)
    testImplementation(testFixtures(projects.buildOperations))
    testImplementation(testFixtures(projects.core))

    integTestDistributionRuntimeOnly(projects.distributionsCore)
}

gradleModule {
    computedRuntimes {
        // Auto-generated by `:checkTargetRuntimes --fix`
        client = true
        daemon = true
        worker = true
    }
}

packageCycles {
    excludePatterns.add("org/gradle/api/internal/**")
}

strictCompile {
    ignoreRawTypes() // raw types used in public API (Closure)
}

errorprone {
    nullawayEnabled = false
}
