How to access credentials for repository in functionalTest?

I have created a custom gradle plugin and have written functionalTests as well.

So far I have been placing my personal email and artifactory-key to resolve the dependencies

I want to use a service account for that and I don’t want that to be hard-coded.

What’s the best way to do this?