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') |
iadcode | a8c041d | 2021-03-02 14:15:13 +1100 | [diff] [blame] | 47 | ext.servletVersion = property('servlet.version') |
pengzhouhu | 6e4c581 | 2019-10-21 22:21:11 +0800 | [diff] [blame] | 48 | ext.tomcatEmbedVersion = property('tomcat.embed.version') |
Alex Volanis | 7004a61 | 2018-01-24 10:30:13 -0500 | [diff] [blame] | 49 | ext.slf4jVersion = property('slf4j.version') |
| 50 | ext.junitVersion = property('junit.version') |
| 51 | ext.mockitoVersion = property('mockito.version') |
Fokko Driesprong | 1686c87 | 2019-02-01 20:31:58 +0100 | [diff] [blame] | 52 | ext.javaxAnnotationVersion = property('javax.annotation.version') |
Alex Volanis | 7004a61 | 2018-01-24 10:30:13 -0500 | [diff] [blame] | 53 | |
| 54 | // In this section you declare where to find the dependencies of your project |
| 55 | repositories { |
| 56 | maven { |
| 57 | name 'Maven Central Repository' |
| 58 | url mvnRepo |
| 59 | } |
| 60 | maven { |
| 61 | name 'Apache Maven Repository' |
| 62 | url apacheRepo |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | dependencies { |
| 67 | compile "org.slf4j:slf4j-api:${slf4jVersion}" |
| 68 | compile "org.apache.httpcomponents:httpclient:${httpclientVersion}" |
| 69 | compile "org.apache.httpcomponents:httpcore:${httpcoreVersion}" |
iadcode | a8c041d | 2021-03-02 14:15:13 +1100 | [diff] [blame] | 70 | compile "javax.servlet:javax.servlet-api:${servletVersion}" |
Fokko Driesprong | 1686c87 | 2019-02-01 20:31:58 +0100 | [diff] [blame] | 71 | compile "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}" |
Alex Volanis | 7004a61 | 2018-01-24 10:30:13 -0500 | [diff] [blame] | 72 | |
| 73 | testCompile "junit:junit:${junitVersion}" |
| 74 | testCompile "org.mockito:mockito-all:${mockitoVersion}" |
| 75 | testRuntime "org.slf4j:slf4j-log4j12:${slf4jVersion}" |
| 76 | } |