apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.compile-api'
apply plugin: 'nebula.source-jar'
apply plugin: 'nebula.optional-base'

dependencies {
    compileOnly 'org.apache.thrift:libthrift', optional

    compileOnly "org.springframework.boot:spring-boot-starter-web", optional
    compileOnly "org.springframework.boot:spring-boot-starter-actuator", optional
    compileOnly "org.springframework.cloud:spring-cloud-starter-loadbalancer", optional
    compileOnly "org.springframework.cloud:spring-cloud-starter-sleuth", optional

    compileOnly 'org.apache.commons:commons-pool2', optional
    compileOnly 'org.apache.commons:commons-lang3', optional
}

publishing {
    repositories {
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/aatarasoff/spring-thrift-starter")
            credentials {
                username = System.getenv("USERNAME")
                password = System.getenv("TOKEN")
            }
        }
    }
    publications {
        nebula(MavenPublication) {
        }
    }
}
