plugins {
    id "java"
    id 'checkstyle'
    id 'application'
    id 'io.freefair.lombok' version '8.10'
}

allprojects {
    group = 'com.epam.aidial'
    version = "0.37.0-rc"

    apply plugin: 'java'
    apply plugin: 'checkstyle'
    apply plugin: 'application'
    apply plugin: 'io.freefair.lombok'

    java {
        toolchain {
            languageVersion = JavaLanguageVersion.of(21)
        }
    }

    checkstyle {
        configDirectory = file("$rootProject.projectDir/checkstyle")
    }

    repositories {
        maven {
            url = uri("https://maven.pkg.github.com/epam/jclouds")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("GPR_USERNAME")
                password = project.findProperty("gpr.key") ?: System.getenv("GPR_PASSWORD")
            }
        }
        mavenCentral()
    }

    configurations.configureEach {
        resolutionStrategy {
            force 'com.google.code.gson:gson:2.11.0'
            force 'net.minidev:json-smart:2.5.2'
            force 'io.grpc:grpc-netty-shaded:1.75.0'
        }
    }

}
