view buildSrc/build.gradle @ 11208:db2c977a840b

8220147: Cherry pick GTK WebKit 2.22.7 changes Reviewed-by: mbilla, kcr
author arajkumar
date Fri, 08 Mar 2019 14:03:47 +0530
parents 53878b83c2bd
children
line wrap: on
line source
/*
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * 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 www.oracle.com 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
 * gradle.properties 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 {
        mavenCentral()
    }
}

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;
    include("**/*Test.*");
    exclude("**/DepthTest.*");
    exclude("**/*Abstract*.*");
}