buildscript { ext.kotlin_version = '1.2.21' repositories { jcenter() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: 'kotlin' sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. repositories { jcenter() } dependencies { compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.3.3' compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.3' compile group: 'commons-logging', name: 'commons-logging', version: '1.1.3' compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0' compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: project.kotlin_version } compileKotlin { kotlinOptions { jvmTarget = "1.8" } }