Plugin Development: Specify keystore during test execution

Hi all,

How do I specify keystore during test execution while building my gradle plugin?

Modifying jre/lib/security/cacerts works but that’s clearly not the right approach Adding the following didn’t seem to work:

gradle test -Djavax.net.ssl.trustStore=mystore.cacerts

gradle test -Djavax.net.ssl.keyStore=mystore.cacerts

What’s the right way to add system properties to test execution, or am I using the wrong properties…

Thanks

Peter

1 Like

You can set system properties for the test jvm as such:

test {
  systemProperty 'javax.net.ssl.trustStore', 'mystore.cacerts'
}
1 Like

Thanks Gary…that’s great.