|
@@ -0,0 +1,177 @@
|
|
|
|
+configure(allprojects) { project ->
|
|
|
|
+ apply plugin: 'org.springframework.boot'
|
|
|
|
+ apply plugin: 'io.spring.dependency-management'
|
|
|
|
+ apply plugin: 'java'
|
|
|
|
+ apply plugin: 'idea'
|
|
|
|
+ sourceCompatibility = 1.8
|
|
|
|
+ targetCompatibility = 1.8
|
|
|
|
+ configurations {
|
|
|
|
+ developmentOnly
|
|
|
|
+ runtimeClasspath {
|
|
|
|
+ extendsFrom developmentOnly
|
|
|
|
+ }
|
|
|
|
+ compileOnly {
|
|
|
|
+ extendsFrom annotationProcessor
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // java编译的时候缺省状态下会因为中文字符而失败
|
|
|
|
+ [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
|
|
|
|
+ dependencyManagement {
|
|
|
|
+ overriddenByDependencies = true
|
|
|
|
+ imports {
|
|
|
|
+ mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
|
|
|
|
+ mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
|
|
|
|
+ mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
|
|
|
|
+ }
|
|
|
|
+ dependencies {
|
|
|
|
+ dependency "cec.dhc.plffwk.comps:cecdhc-plffwk-component:${cecdhcFwkCommsVersion}"
|
|
|
|
+ dependency "cec.dhc.plffwk.tools:cecdhc-plffwk-utils:${cecdhcFwkUtilsVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.knife4j:cecdhc-devfwk-starters-knife4j:${cecdhcKnife4jStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.web:cecdhc-devfwk-starters-web:${cecdhcWebStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.log:cecdhc-devfwk-starters-log:${cecdhcLogStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.redis:cecdhc-devfwk-starters-redis:${cecdhcRedisStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.nacos:cecdhc-devfwk-starters-nacos:${cecdhcNacosStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.mybatis:cecdhc-devfwk-starters-mybatis:${cecdhcMybatisStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.feign:cecdhc-devfwk-starters-feign:${cecdhcFeignStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.minio:cecdhc-devfwk-starters-minio:${cecdhcMinioStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.sentinel:cecdhc-devfwk-starters-sentinel:${cecdhSentinelStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.shiro:cecdhc-devfwk-starters-shiro:${cecdhcShiroStarterVersion}"
|
|
|
|
+ dependency "cec.dhc.devfwk.starters.dingding:cecdhc-devfwk-starters-dingding:${cecdhcDingdingStarterVersion}"
|
|
|
|
+
|
|
|
|
+ //security包
|
|
|
|
+ dependency "org.springframework.security:spring-security-core:${springSecurityVersion}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-crypto:${springSecurityVersion}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-config:${springSecurityVersion}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-web:${springSecurityVersion}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-oauth2-jose:${springSecurityVersion}"
|
|
|
|
+ dependency "org.springframework.security.oauth:spring-security-oauth2:${springSecurityOauth2Version}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-jwt:${springSecurityJwtVersion}"
|
|
|
|
+ dependency "com.nimbusds:nimbus-jose-jwt:${nimbusJoseJwtVersion}"
|
|
|
|
+
|
|
|
|
+ //其他包
|
|
|
|
+ dependency "com.github.xiaoymin:knife4j-micro-spring-boot-starter:${knife4jVersion}"
|
|
|
|
+ dependency "com.github.xiaoymin:knife4j-spring-ui:${knife4jVersion}"
|
|
|
|
+ dependency "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "com.baomidou:mybatis-plus-boot-starter:${mybatisPlusVersion}"
|
|
|
|
+ dependency "com.baomidou:mybatis-plus-annotation:${mybatisPlusVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "javax.servlet:javax.servlet-api:${javaxServletVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "io.springfox:springfox-core:${springFoxVersion}"
|
|
|
|
+ dependency "io.swagger:swagger-annotations:${swaggerAnnotationVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "org.redisson:redisson:${redissonVersion}"
|
|
|
|
+ dependency "io.github.openfeign:feign-core:${feignCoreVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "cn.hutool:hutool-all:${hutoolVersion}"
|
|
|
|
+ dependency "commons-io:commons-io:${commonsIoVersion}"
|
|
|
|
+ dependency "commons-codec:commons-codec:${commonsCodecVersion}"
|
|
|
|
+ dependency "org.apache.commons:commons-lang3:${commLang3Version}"
|
|
|
|
+ dependency "org.apache.commons:commons-compress:${commonsCompressVersion}"
|
|
|
|
+ dependency "commons-beanutils:commons-beanutils:${beanUtilsVersion}"
|
|
|
|
+ dependency "org.apache.commons:commons-collections4:${collections4Version}"
|
|
|
|
+
|
|
|
|
+ dependency "com.alibaba:transmittable-thread-local:${threadLocalVersion}"
|
|
|
|
+ dependency "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "cn.stylefeng.roses:pinyin-sdk-pinyin4j:${pinyin4jVersion}"
|
|
|
|
+ dependency "com.esotericsoftware:reflectasm:${reflectasmVersion}"
|
|
|
|
+ dependency "org.lionsoul:ip2region-spring-boot-starter:${ip2regionVersion}"
|
|
|
|
+ dependency "net.coobird:thumbnailator:${thumbnailatorVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "org.apache.commons:commons-pool2:${commonsPool2Version}"
|
|
|
|
+ dependency "org.apache.httpcomponents:httpclient:${httpclientVersion}"
|
|
|
|
+ dependency "org.apache.httpcomponents:httpmime:${httpclientVersion}"
|
|
|
|
+ dependency "org.aspectj:aspectjweaver:${aspectjweaverVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "com.github.whvcse:easy-captcha:${easyCaptchaVersion}"
|
|
|
|
+ dependency "com.github.ulisesbocchio:jasypt-spring-boot-starter:${jasyptSpringBootVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "com.aliyun:alibaba-dingtalk-service-sdk:${dingtalkVersion}"
|
|
|
|
+ dependency "com.google.guava:guava:${guavaVersion}"
|
|
|
|
+ dependency "com.google.code.gson:gson:${gsonVersion}"
|
|
|
|
+ dependency "com.squareup.okhttp3:okhttp:${okhttpVersion}"
|
|
|
|
+ dependency "io.minio:minio:${minioVersion}"
|
|
|
|
+ dependency "org.springframework.security:spring-security-ldap:${securityLdapVersion}"
|
|
|
|
+
|
|
|
|
+ //数据库驱动
|
|
|
|
+ dependency "mysql:mysql-connector-java:${mysqlVersion}"
|
|
|
|
+ dependency "com.oracle.database.jdbc:ojdbc8:${oracleVersion}"
|
|
|
|
+ dependency "com.microsoft.sqlserver:sqljdbc4:${sqljdbcVersion}"
|
|
|
|
+ dependency "org.postgresql:postgresql:${postgresqlVersion}"
|
|
|
|
+ dependency "com.ibm.db2:db2jcc4:${db2Version}"
|
|
|
|
+ dependency "net.sourceforge.jtds:jtds:${jtdsVersion}"
|
|
|
|
+ dependency "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
|
|
|
|
+ dependency "com.auth0:java-jwt:${javaJwtVersion}"
|
|
|
|
+ dependency "org.apache.shiro:shiro-spring:${shiroVersion}"
|
|
|
|
+ dependency " org.springframework.session:spring-session-data-redis:${sessionDataRedisVersion}"
|
|
|
|
+
|
|
|
|
+ dependency "com.alibaba.nacos:nacos-client:${nacosAlibabaVersion}"
|
|
|
|
+ dependency "com.alibaba.nacos:nacos-common:${nacosAlibabaVersion}"
|
|
|
|
+ dependency "com.alibaba.nacos:nacos-api:${nacosAlibabaVersion}"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ dependencies {
|
|
|
|
+ compile "org.slf4j:slf4j-api:${slf4jApiVersion}"
|
|
|
|
+ annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
|
|
|
|
+ compile "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}"
|
|
|
|
+ }
|
|
|
|
+ test {
|
|
|
|
+ useJUnitPlatform()
|
|
|
|
+ }
|
|
|
|
+ idea {
|
|
|
|
+ module {
|
|
|
|
+ inheritOutputDirs = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ sourceSets {
|
|
|
|
+ main {
|
|
|
|
+ output.resourcesDir = java.outputDir
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+configure(rootProject) { project ->
|
|
|
|
+ bootJar {
|
|
|
|
+ enabled(true)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+configure(subprojects) { project ->
|
|
|
|
+ jar {
|
|
|
|
+ classifier = ''
|
|
|
|
+ enabled(true)
|
|
|
|
+ }
|
|
|
|
+ bootJar {
|
|
|
|
+ enabled = false
|
|
|
|
+ }
|
|
|
|
+ sourceSets {
|
|
|
|
+ main {
|
|
|
|
+ java {
|
|
|
|
+ srcDir 'src/main/java'
|
|
|
|
+ }
|
|
|
|
+ resources {
|
|
|
|
+ srcDir 'src/main/java'
|
|
|
|
+ srcDir 'src/main/resources'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+if (JavaVersion.current().isJava8Compatible()) {
|
|
|
|
+ allprojects {
|
|
|
|
+ tasks.withType(Javadoc) {
|
|
|
|
+ options.encoding = 'UTF-8'
|
|
|
|
+ options.addStringOption('Xdoclint:none', '-quiet') // 关闭JDK1.8的doclint特性
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+configurations.all {
|
|
|
|
+ resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
|
|
|
|
+ resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
|
|
+ //当遇到版本冲突时,强制使用指定版本号。(会自动下载,无需在dependencies中配置)
|
|
|
|
+ resolutionStrategy.force([
|
|
|
|
+ "com.alibaba.nacos:nacos-client:${nacosAlibabaVersion}",
|
|
|
|
+ "com.alibaba.nacos:nacos-api:${nacosAlibabaVersion}",
|
|
|
|
+ "com.alibaba.nacos:nacos-common:${nacosAlibabaVersion}"
|
|
|
|
+ ])
|
|
|
|
+}
|