All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.getkeepsafe.dexcount.GradleApi.groovy Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package com.getkeepsafe.dexcount

import org.codehaus.groovy.runtime.InvokerHelper
import org.gradle.StartParameter

/**
 * Attempts to isolate our use bits of the Gradle API that have changed in
 * incompatible ways over time.
 */
final class GradleApi {
    private GradleApi() {
        // no instances
    }

    /**
     * Return {@code true} if Gradle was launched with {@code --stacktrace},
     * otherwise {@code false}.
     *
     * 

Gradle broke compatibility between 2.13 and 2.14 by repackaging * the {@code ShowStacktrace} enum; consequently we need to refer to * it by string name only. * * @param startParam */ static boolean isShowStacktrace(StartParameter startParam) { Enum stacktrace = (Enum) InvokerHelper.invokeMethod( startParam, "getShowStacktrace", null) return "INTERNAL_EXCEPTIONS" != stacktrace.name() } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy