I aggree with Mark Bramnik answer but you can try what can work by comparing documentation of both repositories : https://github.com/dave-ellis/gradle-swagger-plugin and https://github.com/kongchen/swagger-maven-plugin. All name identified in table called "Configuration for apiSource" of the former one could be a variable inside swagger block for gradle.
buildscript {
        repositories {
            mavenLocal()
            maven { url "http://repo.maven.apache.org/maven2" }
        }
        dependencies {
            classpath group: 'com.github.gradle-swagger', name: 'gradle-swagger-plugin', version: '1.0.1-SNAPSHOT'
        }
    }
    apply plugin: 'maven'
    apply plugin: 'swagger'
    apply plugin: 'java'
    swagger {
        endPoints = [
                'com.foo.bar.apis',
                'com.foo.bar.apis.internal.Resource'
        ]
        apiVersion = 'v1'
        basePath = 'http://www.example.com'
        mustacheFileRoot = "${projectDir}/src/main/resources/"
        outputTemplate = "${mustacheFileRoot}/strapdown.html.mustache"
        swaggerDirectory = "${buildDir}/site/api-docs"
        outputPath = "${buildDir}/site/swagger/strapdown.html"
    }