apply plugin: 'java' repositories { mavenCentral() } sourceCompatibility = 1.8 targetCompatibility = 1.8 dependencies { compile "foo:bar:1.0" testCompile "junit:junit:4.12" }