import org.apache.tools.ant.taskdefs.condition.Os /* * 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. */ apply plugin: 'java-library' // this is actually more of an 'application' but we don't want all of what Gradle adds description = 'Cross-DC Manager' dependencies { implementation project(':solr:solrj') implementation project(':solr:solrj-zookeeper') implementation project(':solr:modules:cross-dc') implementation 'io.dropwizard.metrics:metrics-core' implementation 'io.dropwizard.metrics:metrics-servlets' implementation 'org.eclipse.jetty:jetty-server' implementation 'org.eclipse.jetty:jetty-servlet' implementation 'org.slf4j:slf4j-api' runtimeOnly ('com.google.protobuf:protobuf-java-util') runtimeOnly ('commons-codec:commons-codec') implementation 'org.apache.kafka:kafka-clients' runtimeOnly 'org.apache.kafka:kafka_2.13' runtimeOnly 'org.apache.kafka:kafka-streams' runtimeOnly 'org.apache.logging.log4j:log4j-api' runtimeOnly 'org.apache.logging.log4j:log4j-core' runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl' runtimeOnly 'com.lmax:disruptor' testImplementation project(':solr:test-framework') testImplementation 'org.apache.lucene:lucene-test-framework' testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' testImplementation 'junit:junit' testImplementation 'org.mockito:mockito-core' testImplementation 'org.apache.kafka:kafka-streams:3.7.1:test' testImplementation 'org.apache.kafka:kafka-clients:3.7.1:test' testRuntimeOnly 'org.apache.kafka:kafka_2.13:3.7.1:test' testRuntimeOnly 'org.apache.kafka:kafka-server-common:3.7.1:test' } ext { mainClass = 'org.apache.solr.crossdc.manager.consumer.Consumer' // Use of the security manager is not supported on windows. // Mockito does not work with it enabled. useSecurityManager = !Os.isFamily(Os.FAMILY_WINDOWS) } task run(type: JavaExec) { group = 'application' description = 'Run the main class with JavaExecTask' mainClass = project.ext.mainClass classpath = sourceSets.main.runtimeClasspath systemProperties = ["log4j.configurationFile":"file:conf/log4j2.xml"] } jar { manifest { attributes('Main-Class': project.ext.mainClass) } } assemblePackaging { // Add two folders to default packaging. from(projectDir, { include "bin/**" include "conf/**" }) }