How to perform conditional tests on specific properties of Aplication.properties in Gradle?

Asked

Viewed 8 times

0

I am trying to do something similar to -x test, but I want it to be conditional on the property spring.profiles.active of application.properties, if it is in test, as follows.

spring.profiles.active=test

Then the test clause below build.Radle should be activated.

test {
    useJUnitPlatform()
}

I tried to see if there was any way to do with onlyIf, but I did not find any way to do it, I thank you already any help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.