blob: 8c14a5209f93226cf88fe9a693f2011b35614a0c [file] [log] [blame]
Alex Volanis7004a612018-01-24 10:30:13 -05001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20// Following Gradle best practices to keep build logic organized
21
22// Override the build directory if CMake is used (allows for out-of-tree-builds)
23if (hasProperty('build.dir')) {
24 buildDir = file(property('build.dir'))
25}
26
27// In order to remain compatible with other Ant based builds in the system
28// we convert the gradle.properties into DSL friendly camelCased properties
29ext.installPath = property('install.path')
30ext.installJavadocPath = property('install.javadoc.path')
31
Jiayu Liuc4e96c72022-05-19 03:03:07 +080032ext.thriftRoot = rootProject.file('../..')
33ext.thriftCompiler = findProperty('thrift.compiler') ?: "$thriftRoot/compiler/cpp/thrift"
Alex Volanis7004a612018-01-24 10:30:13 -050034
35ext.mvnRepo = property('mvn.repo')
36ext.apacheRepo = property('apache.repo')
37ext.mavenRepositoryUrl = property('maven-repository-url')
38
39// Versions used in this project
40ext.httpclientVersion = property('httpclient.version')
41ext.httpcoreVersion = property('httpcore.version')
iadcodea8c041d2021-03-02 14:15:13 +110042ext.servletVersion = property('servlet.version')
pengzhouhu6e4c5812019-10-21 22:21:11 +080043ext.tomcatEmbedVersion = property('tomcat.embed.version')
Alex Volanis7004a612018-01-24 10:30:13 -050044ext.slf4jVersion = property('slf4j.version')
45ext.junitVersion = property('junit.version')
46ext.mockitoVersion = property('mockito.version')
Fokko Driesprong1686c872019-02-01 20:31:58 +010047ext.javaxAnnotationVersion = property('javax.annotation.version')
Jiayu Liuc4e96c72022-05-19 03:03:07 +080048ext.commonsLang3Version = property('commons-lang3.version')
Alex Volanis7004a612018-01-24 10:30:13 -050049
50// In this section you declare where to find the dependencies of your project
51repositories {
52 maven {
53 name 'Maven Central Repository'
54 url mvnRepo
55 }
56 maven {
57 name 'Apache Maven Repository'
58 url apacheRepo
59 }
60}
61
62dependencies {
Jiayu Liueb62fa82022-05-08 13:01:41 +080063 implementation "org.slf4j:slf4j-api:${slf4jVersion}"
64 implementation "org.apache.httpcomponents:httpclient:${httpclientVersion}"
65 implementation "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
Bogdan Drutu172ad9b2023-04-26 17:45:30 -070066 implementation "jakarta.servlet:jakarta.servlet-api:${servletVersion}"
67 implementation "jakarta.annotation:jakarta.annotation-api:${javaxAnnotationVersion}"
Jiayu Liuc4e96c72022-05-19 03:03:07 +080068 implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
Alex Volanis7004a612018-01-24 10:30:13 -050069
Jiayu Liu0c9c9df2022-05-06 03:30:52 +080070 testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
Jiayu Liu6fefbf42023-04-20 07:41:11 +080071 testImplementation "org.mockito:mockito-core:${mockitoVersion}"
Jiayu Liueb62fa82022-05-08 13:01:41 +080072 testRuntimeOnly "org.slf4j:slf4j-log4j12:${slf4jVersion}"
Alex Volanis7004a612018-01-24 10:30:13 -050073}