// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        kotlin_version = '1.4.30'
    }
    repositories {
        mavenCentral()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

plugins {
    id 'java-library'
    id 'maven-publish'
    id "com.github.spotbugs" version "4.5.0"
}

allprojects {
    repositories {
        mavenCentral()
        google()
    }
    group = 'com.yubico.yubikit'
}

subprojects {
    version = '2.0.1-SNAPSHOT'
    ext.pomName = "Yubico YubiKit ${project.name.capitalize()}"

    apply plugin: 'com.github.spotbugs'

    tasks.withType(Javadoc) {
        failOnError false
        options.addStringOption('Xdoclint:none', '-quiet')
        options.addStringOption('encoding', 'UTF-8')
        options.addStringOption('charSet', 'UTF-8')
    }
}

dependencies {
    spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
}

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