/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java library project to get you started.
 * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.8/userguide/building_java_projects.html in the Gradle documentation.
 * This project uses @Incubating APIs which are subject to change.
 */

plugins {
    // Apply the java-library plugin for API and implementation separation.
    id 'java-library'
    id 'maven-publish'
}

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()

    // WPILib
    maven {
        url "https://frcmaven.wpi.edu/artifactory/release/"
    }

    // CTRE
    maven {
        url "https://maven.ctr-electronics.com/release/"
    }

    // REV
    maven {
        url "https://maven.revrobotics.com/"
    }

    // KAUAI
    maven {
        url "https://dev.studica.com/maven/release/2024/"
    }
}

def WPI_Version = '2024.3.2'
def REV_Version = '2024.2.4'
def CTRE_Version = '24.3.0'
def KAUAI_Version = '2024.1.0'

dependencies {
    // This dependency is exported to consumers, that is to say found on their compile classpath.
    api libs.commons.math3

    // This dependency is used internally, and not exposed to consumers on their own compile classpath.
    implementation libs.guava

    // WPILib
    implementation "edu.wpi.first.wpilibj:wpilibj-java:$WPI_Version"
    implementation "edu.wpi.first.wpiutil:wpiutil-java:$WPI_Version"
    implementation "edu.wpi.first.hal:hal-java:$WPI_Version"

    // REVRobotics
    implementation "com.revrobotics.frc:REVLib-java:$REV_Version"

    // CTRE
    implementation "com.ctre.phoenix6:wpiapi-java:$CTRE_Version"

    // KAUAI
    implementation "com.kauailabs.navx.frc:navx-frc-java:$KAUAI_Version"
}

java {
    withJavadocJar()
    withSourcesJar()

    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

publishing() {
    publications {
        maven(MavenPublication) {
            group = 'com.autodesk.synthesis'
            artifactId = 'SyntheSimJava'
            version = '1.0.0'

            from components.java
        }
    }
}
