blob: 45fa63a17544ea5ef42f98e2ac47567b2bea0ed1 [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')
Fokko Driesprong1686c872019-02-01 20:31:58 +010051ext.javaxAnnotationVersion = property('javax.annotation.version')
Alex Volanis7004a612018-01-24 10:30:13 -050052
53// In this section you declare where to find the dependencies of your project
54repositories {
55 maven {
56 name 'Maven Central Repository'
57 url mvnRepo
58 }
59 maven {
60 name 'Apache Maven Repository'
61 url apacheRepo
62 }
63}
64
65dependencies {
66 compile "org.slf4j:slf4j-api:${slf4jVersion}"
67 compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
68 compile "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
69 compile "javax.servlet:servlet-api:${servletVersion}"
Fokko Driesprong1686c872019-02-01 20:31:58 +010070 compile "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}"
Alex Volanis7004a612018-01-24 10:30:13 -050071
72 testCompile "junit:junit:${junitVersion}"
73 testCompile "org.mockito:mockito-all:${mockitoVersion}"
74 testRuntime "org.slf4j:slf4j-log4j12:${slf4jVersion}"
75}