buildscript {
  ext {
    springBootVersion = '2.5.0'
    gradleGitVersion = '1.5.2'
    sonarqubeVersion = '2.6.2'
    kotlinVersion = '1.5.20'
    testLoggerVersion = '1.6.0'
  }

  repositories {
    mavenLocal()
    maven { url "https://plugins.gradle.org/m2/" }
    maven { url 'https://repo.spring.io/plugins-release' }
    maven { url 'https://jitpack.io' }
  }

  dependencies {
    classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:${gradleGitVersion}"
    classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
    classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${sonarqubeVersion}"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
    classpath "com.adarshr:gradle-test-logger-plugin:$testLoggerVersion"
  }
}

allprojects {

  repositories {
    maven { url "https://dimensional.jfrog.io/artifactory/maven" } // melike2d
    mavenCentral()                     // main maven repo
    jcenter()                          // other stuff
    mavenLocal()                       // useful for developing
    maven { url "https://jitpack.io" } // build projects directly from github
    maven { url 'https://m2.dv8tion.net/releases' } // JDA and stuff related to jda
  }

  group = 'lavalink'
}

subprojects {
  apply plugin: 'java'
  apply plugin: 'idea'

  compileJava.dependsOn 'clean'
  compileJava.options.encoding = 'UTF-8'
  compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"

  task sourceJar(type: Jar) {
    from sourceSets.main.allJava
  }

  ext {
    //@formatter:off
    lavaplayerVersion          = '1.3.78'
    lavaplayerIpRotatorVersion = '0.2.3'
    jdaNasVersion              = '1.1.0'
    koeVersion                 = '1864a8b803'
    lavaDspVersion             = '0.7.7'
    nettyEpollVersion          = "4.1.65.Final"
    udpQueueVersion            = "1.1.1-linux64"

    springBootVersion          = "${springBootVersion}"
    springWebSocketVersion     = '5.3.7'
    logbackVersion             = '1.2.3'
    sentryLogbackVersion       = '4.3.0'
    oshiVersion                = '5.7.4'
    jsonOrgVersion             = '20210307'
    spotbugsAnnotationsVersion = '4.2.3'
    prometheusVersion          = '0.11.0'
    commonsLangVersion         = '3.12.0'
    gsonVersion                = '2.8.7'
    //@formatter:on
  }
}

ext {
  moduleName = 'Lavalink-Parent'
}
