buildscript { ext { springBootVersion = '1.5.9.RELEASE' } repositories { mavenCentral() maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") //spring boot hot deploy plugin classpath("org.springframework:springloaded:1.2.5.RELEASE") classpath "com.diffplug.spotless:spotless-plugin-gradle:6.0.0" } } apply plugin: 'java' apply plugin: 'scala' apply plugin: 'eclipse' apply plugin: 'application' apply plugin: 'org.springframework.boot' apply plugin: "com.diffplug.spotless" eclipse { classpath { downloadSources = true downloadJavadoc = false } } ext { sourceCompatibility = 1.8 targetCompatibility = 1.8 } jar { manifest { attributes 'Main-Class': 'io.github.dreamylost.Application' } archiveBaseName.set('Sim') archiveVersion.set('1.3.1') destinationDirectory.set(file("$rootDir/dist")) } repositories { // maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } jcenter() mavenCentral() } dependencies { //spring boot compile("org.springframework.boot:spring-boot-starter-web") { transitive = false } compile("org.springframework.boot:spring-boot-starter-actuator") compile("org.springframework.boot:spring-boot-starter-websocket") compile("org.springframework.boot:spring-boot-starter-data-redis") compile("org.springframework.boot:spring-boot-starter-mail") //scala compile "org.scala-lang:scala-library:2.13.6" //mysql driver compile("mysql:mysql-connector-java:8.0.27") //alibaba druid compile 'com.alibaba:druid:1.0.26' //mybatis compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1") compile("com.github.pagehelper:pagehelper:4.1.0") //spring security compile("org.springframework.security:spring-security-core:4.1.3.RELEASE") //swagger compile("io.springfox:springfox-swagger2:2.2.2") compile("io.springfox:springfox-swagger-ui:2.2.2") //Tomcat compile("org.apache.tomcat.embed:tomcat-embed-jasper:+") compile("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1") compile("org.apache.taglibs:taglibs-standard-impl:1.2.5") //akka http compile 'com.typesafe.akka:akka-actor_2.13:2.5.32' compile 'com.typesafe.akka:akka-http_2.13:10.1.10' compile 'com.typesafe.akka:akka-slf4j_2.13:2.5.32' compile 'com.typesafe.akka:akka-stream_2.13:2.5.32' //publish compile 'org.reactivestreams:reactive-streams:1.0.0' //config compile 'com.typesafe:config:1.2.1' // scala 序列化 compile 'com.fasterxml.jackson.core:jackson-databind:2.13.0' compile 'com.fasterxml.jackson.core:jackson-core:2.13.0' compile 'com.fasterxml.jackson.core:jackson-annotations:2.13.0' compile 'com.fasterxml.jackson.module:jackson-module-scala_2.13:2.13.0' compile 'com.fasterxml.jackson.module:jackson-modules-java8:2.13.0' // 自己写的的工具 compile 'org.bitlap:scala-macro-tools_2.13:0.3.4' //test testCompile("org.springframework.boot:spring-boot-starter-test") testCompile("junit:junit:4.12") } spotless { scala { scalafmt('2.7.5').configFile('.scalafmt.conf') } } bootRepackage.enabled = true mainClassName = "io.github.dreamylost.Application" [compileScala, compileTestScala]*.options*.encoding = 'UTF-8' // 宏工具必须要配置编译参数 tasks.withType(ScalaCompile) { scalaCompileOptions.additionalParameters = ["-Ymacro-annotations"] }