samedi 6 août 2016

Gradle does not download testCompile dependencies

In the below sample build, using compile rather then testCompile in gradle successfully download the dependencies. But i don't want test jars to be included in compile time classpath.

apply plugin: 'java'

repositories {
  mavenCentral()
}

dependencies {
  testCompile group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'
  testCompile group: 'junit', name: 'junit', version: '4.+'
}

sourceSets {
    main {
        java {
            srcDirs = ['src']
        }
    }
}

Please suggest, how to tell gradle to also download testCompile jars with compile jars.

Aucun commentaire:

Enregistrer un commentaire