plugins {
    id "org.jetbrains.kotlin.jvm" version "1.4.0"
    id "com.gradle.plugin-publish" version "0.11.0"
    id 'java-gradle-plugin'
    id "maven"
}

repositories {
    mavenCentral()
    google()
}

dependencies {

    // Plugin
    implementation gradleApi()
    implementation Dependencies.androidPlugin
    implementation Dependencies.jaxb
    implementation Dependencies.kotlinStandardLibrary
    implementation Dependencies.kotlinPoet

    // Testing
    testImplementation Dependencies.jUnit5Api
    testRuntimeOnly Dependencies.jUnit5Engine
    testImplementation Dependencies.assertJ
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

group = "com.gaelmarhic"
version = "1.9"

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: uri('mavenrepo'))
        }
    }
}

pluginBundle {
    website = "https://github.com/gaelmarhic/Quadrant"
    vcsUrl = "https://github.com/gaelmarhic/Quadrant"
    tags = ["android", "navigation", "multi-module"]
}

gradlePlugin {
    plugins {
        quadrantPlugin {
            id = "com.gaelmarhic.quadrant"
            displayName = "Quadrant"
            description = "A Gradle plugin for Android that makes navigation easy in multi-module projects."
            implementationClass = "com.gaelmarhic.quadrant.QuadrantPlugin"
        }
    }
}

test {
    useJUnitPlatform()
}
