/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 'com.gradle.develocity' version '3.18.2'
    id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2'
}

def isCiServer = System.getenv().containsKey("CI")

develocity {
    server = "https://develocity.apache.org"
    projectId = "eventmesh"
    buildScan {
        uploadInBackground = !isCiServer
        publishing.onlyIf { it.isAuthenticated() }
        obfuscation {
            ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} }
        }
    }
}

buildCache {
    remote(develocity.buildCache) {
        enabled = false
    }
}

rootProject.name = 'eventmesh'
String jdkVersion = "${jdk}"
include 'eventmesh-runtime'
include 'eventmesh-sdks:eventmesh-sdk-java'
include 'eventmesh-common'
include 'eventmesh-starter'
include 'eventmesh-examples'
include 'eventmesh-spi'

include 'eventmesh-openconnect:eventmesh-openconnect-java'
include 'eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-api'
include 'eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-admin'
include 'eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-nacos'

include 'eventmesh-connectors:eventmesh-connector-openfunction'
include 'eventmesh-connectors:eventmesh-connector-rocketmq'
include 'eventmesh-connectors:eventmesh-connector-rabbitmq'
include 'eventmesh-connectors:eventmesh-connector-redis'
include 'eventmesh-connectors:eventmesh-connector-mongodb'
include 'eventmesh-connectors:eventmesh-connector-pulsar'
include 'eventmesh-connectors:eventmesh-connector-kafka'
include 'eventmesh-connectors:eventmesh-connector-s3'
include 'eventmesh-connectors:eventmesh-connector-pravega'
include 'eventmesh-connectors:eventmesh-connector-knative'
include 'eventmesh-connectors:eventmesh-connector-jdbc'
include 'eventmesh-connectors:eventmesh-connector-file'
include 'eventmesh-connectors:eventmesh-connector-spring'
include 'eventmesh-connectors:eventmesh-connector-prometheus'
include 'eventmesh-connectors:eventmesh-connector-dingtalk'
include 'eventmesh-connectors:eventmesh-connector-lark'
include 'eventmesh-connectors:eventmesh-connector-wecom'
include 'eventmesh-connectors:eventmesh-connector-slack'
include 'eventmesh-connectors:eventmesh-connector-wechat'
include 'eventmesh-connectors:eventmesh-connector-http'
include 'eventmesh-connectors:eventmesh-connector-chatgpt'
include 'eventmesh-connectors:eventmesh-connector-canal'

include 'eventmesh-storage-plugin:eventmesh-storage-api'
include 'eventmesh-storage-plugin:eventmesh-storage-standalone'
include 'eventmesh-storage-plugin:eventmesh-storage-kafka'
include 'eventmesh-storage-plugin:eventmesh-storage-pulsar'
include 'eventmesh-storage-plugin:eventmesh-storage-redis'
include 'eventmesh-storage-plugin:eventmesh-storage-rocketmq'
include 'eventmesh-storage-plugin:eventmesh-storage-rabbitmq'

include 'eventmesh-security-plugin'
include 'eventmesh-security-plugin:eventmesh-security-api'
include 'eventmesh-security-plugin:eventmesh-security-acl'
include 'eventmesh-security-plugin:eventmesh-security-auth-http-basic'
include 'eventmesh-security-plugin:eventmesh-security-auth-token'

include 'eventmesh-meta:eventmesh-meta-api'
include 'eventmesh-meta:eventmesh-meta-nacos'
include 'eventmesh-meta:eventmesh-meta-etcd'
include 'eventmesh-meta:eventmesh-meta-consul'
include 'eventmesh-meta:eventmesh-meta-zookeeper'
include 'eventmesh-meta:eventmesh-meta-raft'

include 'eventmesh-protocol-plugin'
include 'eventmesh-protocol-plugin:eventmesh-protocol-api'
include 'eventmesh-protocol-plugin:eventmesh-protocol-openmessage'
include 'eventmesh-protocol-plugin:eventmesh-protocol-cloudevents'
include 'eventmesh-protocol-plugin:eventmesh-protocol-meshmessage'
include 'eventmesh-protocol-plugin:eventmesh-protocol-http'
include 'eventmesh-protocol-plugin:eventmesh-protocol-grpc'
include 'eventmesh-protocol-plugin:eventmesh-protocol-grpcmessage'

include 'eventmesh-metrics-plugin'
include 'eventmesh-metrics-plugin:eventmesh-metrics-api'
include 'eventmesh-metrics-plugin:eventmesh-metrics-prometheus'

include 'eventmesh-trace-plugin'
include 'eventmesh-trace-plugin:eventmesh-trace-api'
include 'eventmesh-trace-plugin:eventmesh-trace-zipkin'
include 'eventmesh-trace-plugin:eventmesh-trace-pinpoint'
include 'eventmesh-trace-plugin:eventmesh-trace-jaeger'

include 'eventmesh-retry'
include 'eventmesh-retry:eventmesh-retry-api'
include 'eventmesh-retry:eventmesh-retry-rocketmq'
include 'eventmesh-runtime-v2'
include 'eventmesh-admin-server'
include 'eventmesh-registry'
include 'eventmesh-registry:eventmesh-registry-api'
include 'eventmesh-registry:eventmesh-registry-nacos'

include 'eventmesh-function'
include 'eventmesh-function:eventmesh-function-api'
include 'eventmesh-function:eventmesh-function-filter'
include 'eventmesh-function:eventmesh-function-transformer'