blob: 5f0d2782bee97bafba1e392fcf1749668819dac6 [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// Using the legacy plugin classpath for Clover so it can be loaded optionally
21buildscript {
22 repositories {
James E. King III98f379e2019-01-22 09:22:04 -050023 mavenCentral()
Alex Volanis7004a612018-01-24 10:30:13 -050024 google()
25 jcenter()
26 gradlePluginPortal()
27 }
28
29 dependencies {
James E. King III98f379e2019-01-22 09:22:04 -050030 classpath 'com.bmuschko:gradle-clover-plugin:2.2.1'
Alex Volanis7004a612018-01-24 10:30:13 -050031 }
32}
33
34plugins {
35 id 'java'
36 id 'maven'
37 id 'signing'
James E. King III98f379e2019-01-22 09:22:04 -050038 id 'com.github.johnrengelman.shadow' version '4.0.4'
Alex Volanis7004a612018-01-24 10:30:13 -050039}
40
41description = 'Apache Thrift Java Library'
42
43defaultTasks 'build'
44
45// Version components for this project
46group = property('thrift.groupid')
47
Alex Volanis7004a612018-01-24 10:30:13 -050048if (Boolean.parseBoolean(project.release)) {
James E. King III98f379e2019-01-22 09:22:04 -050049 version = property('thrift.version')
Alex Volanis7004a612018-01-24 10:30:13 -050050} else {
James E. King III98f379e2019-01-22 09:22:04 -050051 version = property('thrift.version') + '-SNAPSHOT'
Alex Volanis7004a612018-01-24 10:30:13 -050052}
53
54// Keeping the rest of the build logic in functional named scripts for clarity
55apply from: 'gradle/environment.gradle'
56apply from: 'gradle/sourceConfiguration.gradle'
57apply from: 'gradle/additionalArtifacts.gradle'
58apply from: 'gradle/generateTestThrift.gradle'
59apply from: 'gradle/unitTests.gradle'
60apply from: 'gradle/cloverCoverage.gradle'
61apply from: 'gradle/functionalTests.gradle'
62apply from: 'gradle/publishing.gradle'
63apply from: 'gradle/codeQualityChecks.gradle'