| Alex Volanis | 7004a61 | 2018-01-24 10:30:13 -0500 | [diff] [blame] | 1 | /* | 
 | 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) | 
 | 23 | if (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 | 
 | 29 | ext.installPath = property('install.path') | 
 | 30 | ext.installJavadocPath = property('install.javadoc.path') | 
 | 31 |  | 
 | 32 | ext.thriftRoot = file('../..') | 
 | 33 |  | 
 | 34 | if (hasProperty('thrift.compiler')) { | 
 | 35 |     ext.thriftCompiler = property('thrift.compiler') | 
 | 36 | } else { | 
 | 37 |     ext.thriftCompiler = "$thriftRoot/compiler/cpp/thrift" | 
 | 38 | } | 
 | 39 |  | 
 | 40 | ext.mvnRepo = property('mvn.repo') | 
 | 41 | ext.apacheRepo = property('apache.repo') | 
 | 42 | ext.mavenRepositoryUrl = property('maven-repository-url') | 
 | 43 |  | 
 | 44 | // Versions used in this project | 
 | 45 | ext.httpclientVersion = property('httpclient.version') | 
 | 46 | ext.httpcoreVersion = property('httpcore.version') | 
 | 47 | ext.servletVersion = property('servlet.version') | 
 | 48 | ext.slf4jVersion = property('slf4j.version') | 
 | 49 | ext.junitVersion = property('junit.version') | 
 | 50 | ext.mockitoVersion = property('mockito.version') | 
 | 51 |  | 
 | 52 | // In this section you declare where to find the dependencies of your project | 
 | 53 | repositories { | 
 | 54 |     maven { | 
 | 55 |         name 'Maven Central Repository' | 
 | 56 |         url mvnRepo | 
 | 57 |     } | 
 | 58 |     maven { | 
 | 59 |         name 'Apache Maven Repository' | 
 | 60 |         url apacheRepo | 
 | 61 |     } | 
 | 62 | } | 
 | 63 |  | 
 | 64 | dependencies { | 
 | 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 | } |