buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath 'com.benjaminsproule:swagger-gradle-plugin:+'
    }
}

plugins {
    id 'org.springframework.boot' version '3.1.3'
    id 'io.spring.dependency-management' version '1.1.3'
    id 'groovy'
}

apply plugin: 'com.benjaminsproule.swagger'

group = 'com.benjaminsproule'
version = '0.0.1-SNAPSHOT'

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
}

dependencies {
    implementation 'org.apache.groovy:groovy:4.0.14'
    implementation 'org.springframework.boot:spring-boot-starter-jersey'
    implementation 'io.swagger:swagger-annotations:1.6.11'
    implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
}

swagger {
    apiSource {
        springmvc = false
        locations = ['com.benjaminsproule.sample']
        schemes = ['http', 'https']
        host = 'www.example.com:8080'
        basePath = '/sample'
        swaggerDirectory = "${project.buildDir}/swagger-ui"
        securityDefinition {
            json = 'securityDefinition.json'
        }
    }
}
