buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.2.7.RELEASE'
        classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:5.0.3'
        classpath "com.netflix.nebula:nebula-publishing-plugin:16.0.0"
    }
}

allprojects {
    group = 'info.developerblog.spring.thrift'
    version = '3.0.1'

    repositories {
        jcenter()
    }

    apply plugin: 'idea'
    apply plugin: 'io.spring.dependency-management'

    dependencyManagement {
        imports {
            mavenBom "org.springframework.cloud:spring-cloud-starter-parent:2021.0.2"
        }

        dependencies {
            dependency 'org.projectlombok:lombok:1.18.12'
            dependency 'org.apache.thrift:libthrift:0.16.0'
            dependency 'org.apache.commons:commons-pool2:2.11.1'
            dependency 'org.apache.commons:commons-lang3:3.12.0'
        }
    }

    task resolveAllDependencies {
        doLast {
            configurations.all { it.resolve() }
        }
    }
}

subprojects {
    apply plugin: 'java'


    sourceCompatibility = 1.8
    targetCompatibility = 1.8

    test {
        reports {
            junitXml.enabled = true
            html.enabled = true
        }

        useJUnitPlatform()
    }

    dependencies {
        compileOnly "org.projectlombok:lombok"
        annotationProcessor "org.projectlombok:lombok"

        testCompile "org.springframework.boot:spring-boot-starter-test"
    }
}
