view buildSrc/build.gradle @ 11348:6744f504e684

8231310: Add .jcheck/conf to jfx git repo Reviewed-by: prr, jvos
author kcr
date Tue, 01 Oct 2019 05:28:24 -0700
parents 53878b83c2bd
line wrap: on
line source
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit if you need additional information or have any
 * questions.

 * Build file for buildSrc project. The buildSrc project contains the annotation
 * processor that is used to generate the decora compiler used for effects,
 * and various annotations we use for FXML, etc. It also contains build script logic such
 * as for compiling native code. Nothing in buildSrc should *ever* be shipped with the runtime.

 * If the given named property is not defined, then this method will define
 * it with the given defaultValue. Any properties defined by this method can
 * be substituted on the command line by using -P, or by specifying a
 * file in the user home dir
 * @param name The name of the property to define
 * @param defaultValue The default value to assign the property
void defineProperty(String name, String defaultValue) {
    if (!project.hasProperty(name)) {
        project.ext.set(name, defaultValue);

def closedDir = file("../../rt-closed")
def buildClosed = closedDir.isDirectory()

if (buildClosed) {
    File supplementalBuildFile = new File("../../rt-closed/closed-properties.gradle");
    apply from: supplementalBuildFile

apply plugin: "java"

repositories {
    if (buildClosed) {
        ivy {
            url jfxRepositoryURL
            layout "pattern", {
                artifact "[artifact]-[revision].[ext]"
                artifact "[artifact].[ext]"
    } else {

dependencies {
    testCompile group: "junit",     name: "junit",          version: "4.8.2"

// At the moment the ASM library shipped with Gradle that is used to
// discover the different test classes fails on Java 8, so in order
// to have sourceCompatibility set to 1.8 I have to also turn scanForClasses off
// and manually specify the includes / excludes. At the moment we use
// Java 7 but when we switch to 8 this will be needed, and probably again when
// we start building with Java 9.
test {
    enableAssertions = true;
    testLogging.exceptionFormat = "full";
    scanForTestClasses = false;