blob: b6cfb2123fae06de7f452bcf647ca670286341e2 [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
32ext.thriftRoot = file('../..')
33
34if (hasProperty('thrift.compiler')) {
35 ext.thriftCompiler = property('thrift.compiler')
36} else {
37 ext.thriftCompiler = "$thriftRoot/compiler/cpp/thrift"
38}
39
40ext.mvnRepo = property('mvn.repo')
41ext.apacheRepo = property('apache.repo')
42ext.mavenRepositoryUrl = property('maven-repository-url')
43
44// Versions used in this project
45ext.httpclientVersion = property('httpclient.version')
46ext.httpcoreVersion = property('httpcore.version')
iadcodea8c041d2021-03-02 14:15:13 +110047ext.servletVersion = property('servlet.version')
pengzhouhu6e4c5812019-10-21 22:21:11 +080048ext.tomcatEmbedVersion = property('tomcat.embed.version')
Alex Volanis7004a612018-01-24 10:30:13 -050049ext.slf4jVersion = property('slf4j.version')
50ext.junitVersion = property('junit.version')
51ext.mockitoVersion = property('mockito.version')
Fokko Driesprong1686c872019-02-01 20:31:58 +010052ext.javaxAnnotationVersion = property('javax.annotation.version')
Alex Volanis7004a612018-01-24 10:30:13 -050053
54// In this section you declare where to find the dependencies of your project
55repositories {
56 maven {
57 name 'Maven Central Repository'
58 url mvnRepo
59 }
60 maven {
61 name 'Apache Maven Repository'
62 url apacheRepo
63 }
64}
65
66dependencies {
67 compile "org.slf4j:slf4j-api:${slf4jVersion}"
68 compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
69 compile "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
iadcodea8c041d2021-03-02 14:15:13 +110070 compile "javax.servlet:javax.servlet-api:${servletVersion}"
Fokko Driesprong1686c872019-02-01 20:31:58 +010071 compile "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}"
Alex Volanis7004a612018-01-24 10:30:13 -050072
73 testCompile "junit:junit:${junitVersion}"
74 testCompile "org.mockito:mockito-all:${mockitoVersion}"
75 testRuntime "org.slf4j:slf4j-log4j12:${slf4jVersion}"
76}