How can I represent configuration of artifactory plugin from my custom plugin in Kotlin?

class CustomPlugin implements Plugin<Project> {
    void apply(Project target) {
        target.apply plugin: 'com.jfrog.artifactory'
        target.artifactory {
            contextUrl = "http://some/artifactory/"


Specifically, I don’t understand what target.artifactory is

If I have the correct plugin code, it uses the old-style/deprecated “conventions” rather than the newer extension concept. I think this is the code that creates that convention.
You should be able to get a reference to that convention using the Convention interface:

ArtifactoryPluginConvention art = project.getRootProject().getConvention().[get|find]Plugin(ArtifactoryPluginConvention.class)