buildscript { ext.kotlin_version = '1.2.21' repositories { 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 'org.apache.logging.log4j:log4j-api:2.8.1' compile "org.apache.httpcomponents:httpclient:4.3.3" compile "com.google.code.gson:gson:2.8.0" compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } compileKotlin { kotlinOptions { jvmTarget = "1.8" } }