ext.moduleName = 'aion.db.impl'

configurations { 
    testClassesOut
}


sourceSets {
    test {
        resources {
            srcDirs = ['test_resources']
        }
    }

    unitTest {
        resources {
            srcDirs = ['test_resources']
        }
        java {
            srcDirs = ['test']
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
        }
    }
}

dependencies {
    //compile 'network.aion:util4j:0.4.0'
    //compile 'network.aion:log4j:0.4.0'
    compile project(':modUtil')
    compile project(':modLogger')

    compile 'com.google.guava:guava:25.1-jre'
    compile 'org.slf4j:slf4j-api:1.7.25'
    compile group: 'org.ethereum', name: 'leveldbjni-all', version: '1.18.3'
    compile group: 'org.rocksdb', name: 'rocksdbjni', version: '6.4.6'
    compile group: 'com.h2database', name: 'h2-mvstore', version: '1.4.196'
    compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.8.2'
    compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.0'
    compile 'com.github.ben-manes.caffeine:caffeine:2.8.0'

    testCompile 'junit:junit:4.12'
    testCompile 'com.google.truth:truth:0.42'
    testCompile 'org.hamcrest:hamcrest-core:1.3'
    testCompile "org.mockito:mockito-core:2.23.0"
    testCompile 'pl.pragmatists:JUnitParams:1.1.1'
    testCompile 'com.spotify:docker-client:8.14.5'

    // modAionImpl's tests uses test util classes from
    // this module's test sources.  Gradle Java plug-in
    // does not make test classes available by to dependent
    // projects by default; so this is needed to override
    // that behaviour.
    testClassesOut sourceSets.test.output
}

configurations {
    unitTestCompile.extendsFrom testCompile
    unitTestRuntime.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")
