buildscript { ext { kotlin_version = '1.2.61' springBootVersion = '2.0.1.RELEASE' springCloudVersion = 'Finchley.SR1' junit_version = '4.12' commons_io_version = '2.5' commons_lang3_version = '3.5' commons_codec_version = '1.10' commons_fileupload_version = '1.3.2' slf4j_api_version = '1.7.25' } repositories { mavenCentral() maven { url = 'http://repo.spring.io/plugins-release' } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version" classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } allprojects { group = "cn.gygxzc.cloud.tina" version = "1.0" } subprojects { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' apply plugin: 'kotlin' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-spring' sourceCompatibility = 1.8 targetCompatibility = 1.8 [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8' compileJava.dependsOn(processResources) repositories { mavenCentral() jcenter() } dependencyManagement { imports { mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.SR1' } } configurations{ all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' all*.exclude group: 'org.hibernate.validator' } dependencies { // Kotlin compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version") compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version") kapt("org.springframework.boot:spring-boot-configuration-processor") // SpringBoot Starter compile('org.springframework.cloud:spring-cloud-config-server') compile('org.springframework.boot:spring-boot-starter-jetty') compile('org.springframework.boot:spring-boot-starter-security') compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server') // compile('org.springframework.cloud:spring-cloud-starter-openfeign') // // commons compile("commons-io:commons-io:$commons_io_version") compile("org.apache.commons:commons-lang3:$commons_lang3_version") compile("commons-codec:commons-codec:$commons_codec_version") // logger compile("org.slf4j:slf4j-api:$slf4j_api_version") compile("javax.servlet:javax.servlet-api:3.1.0") compile("javax.servlet:servlet-api:2.5") ext.jarTree = fileTree(dir: 'libs', include: '**/*.jar') compile jarTree } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions { jvmTarget = "1.8" } } bootJar { enabled = false } jar { enabled = true } }