apply plugin: 'java-library'

description = 'Apollo Utilities'

dependencies {
    api group: 'io.netty', name: 'netty-all', version: nettyVersion

    implementation group: 'org.apache.commons', name: 'commons-compress', version: commonsCompressVersion
    implementation group: 'com.google.guava', name: 'guava', version: guavaVersion
    implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: bouncycastleVersion

    test.useJUnitPlatform()
    testImplementation group: 'junit', name: 'junit', version: junitVersion
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junitJupiterVersion
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitJupiterVersion
    testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: junitVintageVersion
    testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: junitPlatformVersion
}

task(genRsa, dependsOn: classes, type: JavaExec) {
    def utilSubproject = project(':util')
    def utilClasspath = utilSubproject.sourceSets.main.runtimeClasspath

    main = 'org.apollo.util.tools.RsaKeyGenerator'
    classpath = utilClasspath
    jvmArgs = ['-Xmx1024M']
    workingDir = project.rootDir
}
