plugins {
    id 'java'
}

description = 'Provides database access and connectivity'
group 'edu.msudenver.tsp'
version '1.0'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile fileTree(dir: 'lib', include: '**/*.jar')
    
    compile 'com.mchange:c3p0:0.9.5.2'
    compile 'mysql:mysql-connector-java:5.1.35'
    compile 'org.hibernate:hibernate-validator:5.3.4.Final'
    compile 'javax.validation:validation-api:1.1.0.Final'
    compile('com.googlecode.log4jdbc:log4jdbc:1.2') {
        exclude(group: 'org.slf4j')
    }

    testCompile 'javax.el:javax.el-api:3.0.0'
}

task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') {
    workingDir "./scripts/mysql"
    commandLine './loaddb.sh'
}
