buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'commons-math:commons-math:1.1'
    }
}

dependsOn ':shared'

configurations {
   spi
}

dependencies {
    compile project(':shared')
    compile module("commons-lang:commons-lang:2.4") {
        dependency("commons-io:commons-io:1.2")
    }
}

// Just a smoke test that using this option does not lead to any exception
compile.options.compilerArgs = [[value: '-Xlint:unchecked']]

task spiJar(type: Jar) {
    appendix = 'spi'
    fileSet() {
        include('org/gradle/api/')
    }
}

artifacts {
  spi spiJar
}

task dist(type: Zip) {
    dependsOn configurations.runtime.buildDependencies
    files configurations.runtime
    fileSet dir: 'src/dist'
}

// We want to test if commons-math was properly added to the build script classpath
org.apache.commons.math.fraction.Fraction lhs = new org.apache.commons.math.fraction.Fraction(1, 3);
org.gradle.buildsrc.BuildSrcClass bsc = new org.gradle.buildsrc.BuildSrcClass()
