plugins {
    id "org.jetbrains.kotlin.jvm" version "2.0.0"
}

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'java-gradle-plugin'

repositories {
    mavenCentral()
    maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
    implementation 'org.jsoup:jsoup:1.13.1'
    implementation gradleApi()
    implementation localGroovy()

    implementation 'org.apache.httpcomponents:httpclient:4.5.14'
    implementation 'com.google.code.gson:gson:2.10.1'
    implementation "org.jetbrains.kotlin:kotlin-reflect:2.1.0"

    testImplementation 'junit:junit:4.13.2'
    testImplementation 'com.github.stefanbirkner:system-rules:1.16.1'
    testImplementation 'org.mockito:mockito-core:2.23.0'
    testImplementation 'com.nhaarman:mockito-kotlin:1.5.0'
}

gradlePlugin {
    plugins {
        makeDictionaryPlugin {
            id = 'make-dictionary'
            implementationClass = 'MakeDictionaryPlugin'
        }
        manualVersionPlugin {
            id = 'ask.net.evendanan.autoversion'
            implementationClass = 'net.evendanan.versiongenerator.VersionGeneratorPlugin'
        }
        simpleVersionPlugin {
            id = 'ask.net.evendanan.autoversion.simple'
            implementationClass = 'net.evendanan.versiongenerator.SimpleVersionGeneratorPlugin'
        }
    }
}

java {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

compileKotlin {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17

    kotlinOptions {
        jvmTarget = 17
    }
}

compileTestKotlin {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17

    kotlinOptions {
        jvmTarget = 17
    }
}
