buildSrc/src/main/kotlin/source-license-checker.gradle.kts
author Da Risk <da_risk@geekorum.com>
Sun, 10 May 2020 03:53:45 -0400
changeset 8 729a3ee3840a
parent 1 831cffa9c991
child 10 9aad34f43f71
permissions -rw-r--r--
build: also allow instrumentation tests on Java 11

package com.geekorum.build

/**
 * You need to define a License header file in "$rootDir/config/license/header.txt"
 * Define the following property to enable check of license headers
 *    - CHECK_LICENSE_HEADERS : true or false. default is false
 */

val checkLicenseHeadersString = findProperty("CHECK_LICENSE_HEADERS") as String?
val checkLicenseHeader =  checkLicenseHeadersString?.toBoolean() ?: false

if (checkLicenseHeader) {
    configureSourceLicenseChecker()
}