2020-01-27 12:05:34 -05:00
|
|
|
/*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership.
|
|
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
* (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2020-01-10 10:43:52 -05:00
|
|
|
import java.time.ZonedDateTime
|
|
|
|
import java.time.format.DateTimeFormatter
|
2019-12-06 05:55:53 -05:00
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
plugins {
|
|
|
|
id "base"
|
2020-01-09 08:23:35 -05:00
|
|
|
id "com.palantir.consistent-versions" version "1.14.0"
|
2019-12-03 08:40:35 -05:00
|
|
|
id 'de.thetaphi.forbiddenapis' version '2.7' apply false
|
2020-01-26 04:45:05 -05:00
|
|
|
id "org.owasp.dependencycheck" version "5.3.0"
|
2019-12-02 09:34:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Project version and main properties. Applies to all projects.
|
|
|
|
allprojects {
|
|
|
|
version = "9.0.0-SNAPSHOT"
|
|
|
|
}
|
|
|
|
|
2020-01-10 10:43:52 -05:00
|
|
|
ext {
|
|
|
|
def tstamp = ZonedDateTime.now()
|
|
|
|
buildDate = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(tstamp)
|
|
|
|
buildTime = DateTimeFormatter.ofPattern("HH:mm:ss").format(tstamp)
|
|
|
|
buildYear = DateTimeFormatter.ofPattern("yyyy").format(tstamp)
|
2020-01-15 05:44:21 -05:00
|
|
|
|
|
|
|
// Workaround for this one, for now:
|
|
|
|
// https://github.com/palantir/gradle-consistent-versions/issues/383
|
|
|
|
scriptDepVersions = [
|
2020-01-26 13:44:18 -05:00
|
|
|
"apache-rat": "0.11",
|
|
|
|
"jflex": "1.7.0"
|
2020-01-15 05:44:21 -05:00
|
|
|
]
|
2020-01-10 10:43:52 -05:00
|
|
|
}
|
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
// Include smaller chunks configuring dedicated build areas.
|
|
|
|
// Some of these intersect or add additional functionality.
|
|
|
|
// The order of inclusion of these files shouldn't matter (but may
|
|
|
|
// if the build file is incorrectly written and evaluates something
|
|
|
|
// eagerly).
|
|
|
|
|
2020-01-09 11:40:51 -05:00
|
|
|
apply from: file('gradle/generate-defaults.gradle')
|
2019-12-05 05:14:09 -05:00
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
// Set up defaults and configure aspects for certain modules or functionality
|
|
|
|
// (java, tests)
|
|
|
|
apply from: file('gradle/defaults.gradle')
|
|
|
|
apply from: file('gradle/defaults-java.gradle')
|
2020-01-10 10:43:52 -05:00
|
|
|
apply from: file('gradle/defaults-javadoc.gradle')
|
2019-12-02 09:34:57 -05:00
|
|
|
apply from: file('gradle/testing/defaults-tests.gradle')
|
|
|
|
apply from: file('gradle/testing/randomization.gradle')
|
2019-12-05 07:23:43 -05:00
|
|
|
apply from: file('gradle/testing/fail-on-no-tests.gradle')
|
2020-01-09 13:00:32 -05:00
|
|
|
apply from: file('gradle/testing/runtime-jvm-support.gradle')
|
2019-12-03 06:10:13 -05:00
|
|
|
|
|
|
|
// Maven publishing.
|
|
|
|
apply from: file('gradle/maven/defaults-maven.gradle')
|
2019-12-02 09:34:57 -05:00
|
|
|
|
|
|
|
// IDE settings and specials.
|
|
|
|
apply from: file('gradle/defaults-idea.gradle')
|
|
|
|
|
2019-12-03 08:40:35 -05:00
|
|
|
// Validation tasks
|
2020-01-03 09:22:36 -05:00
|
|
|
apply from: file('gradle/validation/precommit.gradle')
|
2019-12-03 08:40:35 -05:00
|
|
|
apply from: file('gradle/validation/forbidden-apis.gradle')
|
2019-12-11 12:41:27 -05:00
|
|
|
apply from: file('gradle/validation/jar-checks.gradle')
|
2020-01-03 09:22:36 -05:00
|
|
|
apply from: file('gradle/validation/git-status.gradle')
|
2020-01-03 10:04:12 -05:00
|
|
|
apply from: file('gradle/validation/versions-props-sorted.gradle')
|
2020-01-10 06:02:30 -05:00
|
|
|
apply from: file('gradle/validation/validate-source-patterns.gradle')
|
2020-01-10 06:49:04 -05:00
|
|
|
apply from: file('gradle/validation/config-file-sanity.gradle')
|
2020-01-15 03:55:41 -05:00
|
|
|
apply from: file('gradle/validation/rat-sources.gradle')
|
2020-01-26 04:01:51 -05:00
|
|
|
apply from: file('gradle/validation/owasp-dependency-check.gradle')
|
2019-12-03 08:40:35 -05:00
|
|
|
|
2020-01-26 13:44:18 -05:00
|
|
|
// Source or data regeneration tasks
|
|
|
|
apply from: file('gradle/generation/jflex.gradle')
|
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
// Additional development aids.
|
2019-12-03 06:10:13 -05:00
|
|
|
apply from: file('gradle/maven/maven-local.gradle')
|
2019-12-02 09:34:57 -05:00
|
|
|
apply from: file('gradle/testing/per-project-summary.gradle')
|
|
|
|
apply from: file('gradle/testing/slowest-tests-at-end.gradle')
|
2020-01-08 06:20:09 -05:00
|
|
|
apply from: file('gradle/testing/failed-tests-at-end.gradle')
|
2020-01-28 11:27:18 -05:00
|
|
|
apply from: file('gradle/testing/profiling.gradle')
|
2019-12-02 09:34:57 -05:00
|
|
|
apply from: file('gradle/help.gradle')
|
|
|
|
|
|
|
|
// Ant-compatibility layer. ALL OF THESE SHOULD BE GONE at some point. They are
|
|
|
|
// here so that we can coexist with current ant build but they are indicative
|
|
|
|
// of potential problems with the build conventions, dependencies, etc.
|
2019-12-13 06:01:26 -05:00
|
|
|
apply from: file('gradle/ant-compat/force-versions.gradle')
|
2019-12-02 09:34:57 -05:00
|
|
|
apply from: file('gradle/ant-compat/folder-layout.gradle')
|
|
|
|
apply from: file('gradle/ant-compat/misc.gradle')
|
|
|
|
apply from: file('gradle/ant-compat/resolve.gradle')
|
|
|
|
apply from: file('gradle/ant-compat/post-jar.gradle')
|
|
|
|
apply from: file('gradle/ant-compat/test-classes-cross-deps.gradle')
|
|
|
|
apply from: file('gradle/ant-compat/artifact-naming.gradle')
|
2019-12-03 08:40:35 -05:00
|
|
|
apply from: file('gradle/ant-compat/solr-forbidden-apis.gradle')
|
2020-01-08 14:17:20 -05:00
|
|
|
apply from: file('gradle/ant-compat/forbidden-api-rules-in-sync.gradle')
|