/*
 * Copyright 2024 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

plugins {
    id("gradlebuild.distribution.api-java")
}

description = "The messages and types sent between client and daemon"

dependencies {
    api(libs.jspecify)
    api(projects.baseServices)
    api(projects.daemonMessaging)
    api(projects.files)
    api(projects.jvmServices)
    api(projects.messaging)
    api(projects.native)
    api(projects.persistentCache)
    api(projects.serialization)
    api(projects.serviceProvider)
    api(projects.stdlibJavaExtensions)
    api(projects.toolchainsJvmShared)

    // The client should not depend on core or core-api, but core still contains some types that are shared between the client and daemon
    api(projects.core)

    implementation(projects.loggingApi)
    implementation(projects.time)

    implementation(libs.guava)
    implementation(libs.jsr305)

    testImplementation(testFixtures(projects.serialization))
    testImplementation(testFixtures(projects.core))

    // Javadoc-only: downstream modules whose types are referenced by {@link ...} in this module's docs.
    javadocReferences(projects.launcher)
}

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