How to define an ivy packager resolver?

Hi, I’d like to make use of an ivy packager repository, but I can’t get it to work in gradle.
I found this reference ivy - gradle - how to declare a dependency of a jar in a jar - Stack Overflow but it’s quite old and also I’m using Kotlin DSL.
Alternatively, it would be great if I could just load an ivysettings.xml file directly, with full features.