CalebFenton/dex-oracle

View on GitHub
driver/build.gradle

Summary

Maintainability
Test Coverage
project.version = '1.1.0'
version = '1.1.0'
def jarVersion = version

apply plugin: 'application'
mainClassName = 'org.cf.driver.OracleDriver'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.code.gson:gson:2.8.2'
    // testCompile 'junit:junit:4.12-beta-3'
}

gradle.projectsEvaluated {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'

group = 'org.cf'
sourceCompatibility = 1.7

jar {
    version = jarVersion
}

// Build a separate jar that contains all dependencies
task fatJar(type: Jar) {
    from sourceSets.main.output
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }

    manifest {
        attributes('Main-Class': mainClassName)
    }

    doLast {
        if (!System.getProperty('os.name').toLowerCase().contains('windows')) {
            ant.symlink(link: file("${destinationDir}/driver.jar"), resource: archivePath, overwrite: true)
        }
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.7'
}