ext.moduleName = 'aion.txpool'

test.dependsOn copyNativeLibsForModuleTests
unitTest.dependsOn copyNativeLibsForModuleTests
benchmarkTest.dependsOn copyNativeLibsForModuleTests
clean.dependsOn deleteNativeLibs

sourceSets {
    unitTest {
        resources {
            srcDirs = ['test']
        }
        java {
            srcDirs = ['test']
            exclude '**/TxnPoolBenchmarkTest.java'
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
        }
    }

    benchmarkTest {
        resources {
            srcDirs = ['test']
        }
        java {
            srcDirs = ['test']
            include '**/TxnPoolBenchmarkTest.java'
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
        }
    }
}


dependencies {
    compile project(':modBase')
    compile files("${rootProject.projectDir}/lib/aion-types-22a3be9.jar")
    compile 'com.google.guava:guava:25.1-jre'
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
    
    testCompile 'junit:junit:4.12'
    testCompile 'com.google.truth:truth:0.42'
}

configurations {
    unitTestCompile.extendsFrom testCompile
    unitTestRuntime.extendsFrom testRuntime

    benchmarkTestCompile.extendsFrom testCompile
    benchmarkTestRuntime.extendsFrom testRuntime
}

// Skip unit tests when doing build task; unit tests are all mixed up with
// long-running integration tests in this module,so doing this to avoid
// build taking too long.
build.dependsOn.remove("check")
