/*
 * The following resolution strategy
 * is required for JRadius library that relies
 * on an old version of bouncycastle.
 */
def dependencyUpdates = gradle.startParameter.taskNames.any {task -> task.equalsIgnoreCase('dependencyUpdates') }
if (!dependencyUpdates) {
    ["runtimeClasspath", "testRuntimeClasspath"].forEach(name -> {
        configurations.named(name).configure {it.resolutionStrategy.force("org.bouncycastle:bcprov-jdk15on:1.63") }
    })
}

description = "Apereo CAS RADIUS RSA MFA Support"
ext {
    publishMetadata = true
    projectMetadata = [
            category: "Multifactor Authentication",
            title: "RADIUS",
            aliases: ["radiusmfa"]
    ]
}

dependencies {
    api project(":api:cas-server-core-api-webflow")
    api project(":api:cas-server-core-api")
    
    implementation project(":core:cas-server-core-webflow")
    implementation project(":core:cas-server-core-multitenancy")
    implementation project(":core:cas-server-core-webflow-api")
    implementation project(":core:cas-server-core-webflow-mfa")
    implementation project(":core:cas-server-core-webflow-mfa-api")
    implementation project(":core:cas-server-core-web-api")
    implementation project(":core:cas-server-core-util-api")
    implementation project(":core:cas-server-core-authentication-mfa-api")
    implementation project(":core:cas-server-core-authentication-api")
    implementation project(":core:cas-server-core-configuration-api")
    implementation project(":core:cas-server-core-services")

    implementation project(":support:cas-server-support-radius-core")
    implementation project(":support:cas-server-support-radius-core-mfa")
    implementation project(":support:cas-server-support-trusted-mfa-core")

    compileOnly project(":support:cas-server-support-trusted-mfa")

    testImplementation project(":core:cas-server-core")
    testImplementation project(":core:cas-server-core-authentication-mfa")
    testImplementation project(":core:cas-server-core-configuration")
    testImplementation project(":core:cas-server-core-tickets")
    testImplementation project(":core:cas-server-core-util")
    testImplementation project(":core:cas-server-core-scripting")
    testImplementation project(":core:cas-server-core-web")
    testImplementation project(":core:cas-server-core-notifications")
    testImplementation project(":core:cas-server-core-rest")
    testImplementation project(":core:cas-server-core-logout")
    testImplementation project(":core:cas-server-core-authentication")
    testImplementation project(":core:cas-server-core-cookie")
    testImplementation project(":core:cas-server-core-audit")

    testImplementation project(":support:cas-server-support-person-directory")
    testImplementation project(":support:cas-server-support-trusted-mfa")

    testImplementation project(path: ":core:cas-server-core-authentication-mfa-api", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-util-api", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-notifications", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-webflow-mfa", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-webflow", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-webflow-mfa-api", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-authentication-api", configuration: "tests")
    testImplementation project(path: ":core:cas-server-core-authentication", configuration: "tests")

    testImplementation project(path: ":support:cas-server-support-person-directory-core", configuration: "tests")
}
