blob: 9b7eb1ed625fd197b63c5670a81a8ba1a492833a [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')
47ext.servletVersion = property('servlet.version')
48ext.slf4jVersion = property('slf4j.version')
49ext.junitVersion = property('junit.version')
50ext.mockitoVersion = property('mockito.version')
51
52// In this section you declare where to find the dependencies of your project
53repositories {
54 maven {
55 name 'Maven Central Repository'
56 url mvnRepo
57 }
58 maven {
59 name 'Apache Maven Repository'
60 url apacheRepo
61 }
62}
63
64dependencies {
65 compile "org.slf4j:slf4j-api:${slf4jVersion}"
66 compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
67 compile "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
68 compile "javax.servlet:servlet-api:${servletVersion}"
69
70 testCompile "junit:junit:${junitVersion}"
71 testCompile "org.mockito:mockito-all:${mockitoVersion}"
72 testRuntime "org.slf4j:slf4j-log4j12:${slf4jVersion}"
73}