buildscript { ext { kotlin_version = '1.3.21' springBootVersion = '2.1.7.RELEASE' mybatisPlusVersion = '3.0.3' junit_version = '4.12' commons_io_version = '2.5' commons_lang3_version = '3.5' commons_codec_version = '1.10' slf4j_api_version = '1.7.25' mysql_connector_version = '5.1.45' mybatis_plus_version = '2.2.0' mybatis_plus_boot_version = '1.0.5' swagger_version = '2.7.0' caffeine_version = '2.6.1' shiro_version = '1.4.0' pinyin4j_version = '2.5.1' rxJavaVersion='2.2.3' jwtVersion = '1.4.1' authVersion='1.2.3' } repositories { maven { url 'https://maven.aliyun.com/repository/central' } maven { url = 'http://repo.spring.io/plugins-release' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } } 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.tonyandmoney.tuon" version = "1.1" } 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) ext{ set('springCloudVersion', 'Greenwich.SR2') set('springBootAdminVersion', '2.1.4') } repositories { maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/jcenter' } } dependencyManagement { imports { mavenBom "de.codecentric:spring-boot-admin-dependencies:${springBootAdminVersion}" mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" mavenBom 'org.springframework.session:spring-session-bom:Bean-SR2' } } configurations{ all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' } dependencies { annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' kapt("org.springframework.boot:spring-boot-configuration-processor") // Kotlin compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version") compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version") testCompile('org.springframework.boot:spring-boot-starter-test') // mq compile("io.reactivex.rxjava2:rxjava:$rxJavaVersion") compile("com.belerweb:pinyin4j:$pinyin4j_version") // 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") compile("javax.servlet:javax.servlet-api:4.0.1") // swagger compile("io.springfox:springfox-swagger2:$swagger_version") compile("io.springfox:springfox-swagger-ui:$swagger_version") 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 } }