This message was deleted.
# dependency-management
s
This message was deleted.
t
What do you mean exactly by "build variant"?
e
I wanted to say build type, but it doesn’t matter, I want something like
Copy code
android.applicationVariants.all {  variant ->
    if (variant.buildType.name == "release"){
        if ((libs.dependency.sdk.get() as String).contains("SNAPSHOT")) {
            throw new GradleException('Release builds should not contain SNAPSHOT builds of the Carealot SDK')
        }
    }
}
t
Then → #CJYS1DAP5 maybe, because Gradle itself does not have a concept of "build type".
e
I think it is code Gradle (https://docs.gradle.org/current/javadoc/org/gradle/nativeplatform/BuildType.html). But it doesn’t matter for my question.
v
As you can see from the package, that build type has to do with building native software (C/C++). It has nothing to do with Java programs, let alone Android apps. So yes, it does matter for your question. What you ask has nothing to do with Gradle itself, but is a specific of the Android Gradle plugin developed by Google. Your chances to find someone able to answer in #CJYS1DAP5 is simply higher and it actually belongs there as it is Android related. 🙂
e
Oke, thank you