Using DSL vs interacting with API in a custom Plugin object

Hi everyone,
I’m writing my first plugin object. It applies an existing plugin and adds some opinion on top of default behavior. I started to wonder if I should be using the DSL or the API.

For example, if I were extending maven-publish plugin, I could do the DSL way:

void apply(Project project) {
    project.apply(plugin: 'maven-publish') // this could go in the dsl too. 
    project.with {
        publishing {
            publications {
                // my settings

Please mention if there’s a better way of doing above than the with{…}

Or I could do the verbose way by utilizing the API.

PublishingExtension extension = project.extensions.getByType(PublishingExtension.class)
// get PublicationContainer
// create a Publication and add it.
// etc.

I find the former concise and simpler as long as the requirements can be met, tested (and the plugin, its dsl are reliable)

Just hoping to get above validated and get your thoughts on best practices.