build.gradle 1.16 KB
Newer Older
Julian Oppermann's avatar
Julian Oppermann committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

plugins {
    // Apply the java plugin to add support for Java
    id 'java'

    // Apply the application plugin to add support for building an application
    id 'application'

    // Enable Eclipse support
    id 'eclipse'
}

// Define the main class for the application
mainClassName = 'graphgen.main.Main'

dependencies {
    // This dependency is found on compile classpath of this component and consumers.
    compile 'org.jgrapht:jgrapht-core:1.2.0'
    // specify cplex.home in gradle.properties
    compile files(project.ext["cplex.home"] + '/cplex/lib/cplex.jar')

    // Use JUnit test framework
    testCompile 'junit:junit:4.12'
}

// In this section you declare where to find the dependencies of your project
repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
}

// use cplex native libs when running/testing
tasks.withType(JavaExec) {
    systemProperty "java.library.path", project.ext["cplex.home"] + '/cplex/bin/' + project.ext["cplex.arch"]
}
tasks.withType(Test) {
    systemProperty "java.library.path", project.ext["cplex.home"] + '/cplex/bin/' + project.ext["cplex.arch"]
}