加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 23.04 KB
一键复制 编辑 原始数据 按行查看 历史
binux 提交于 2017-10-08 20:21 . fix(gradle): 删除失效 nexus 地址
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
}
repositories {
mavenLocal()
// maven{
// url 'http://localhost:8077/nexus/content/groups/public/'
// }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('se.transmode.gradle:gradle-docker:1.2')
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}
configure(allprojects) { project ->
group = "cn.binux"
version = version
ext.springCloudVersion = 'Dalston.RELEASE'
ext.springBootVersion = '1.5.3.RELEASE'
ext.springBootMyBatisVersion = '1.2.0'
ext.springBootpagehelperVersion = '1.1.0'
ext.springBootAdminVersion = '1.5.0'
ext.springBootDruidVersion = '0.0.1-SNAPSHOT'
ext.springBootRedisVersion = '0.0.1-SNAPSHOT'
ext.junitVersion = "4.12"
ext.mysqlVersion = "5.1.32"
ext.jacksonVersion = "2.8.7"
ext.httpclientVersion = "4.3.5"
ext.servletapiVersion = "3.1.0"
ext.commonslangVersion = "2.6"
ext.commonslang3Version = "3.3.2"
ext.commonsioVersion = "1.3.2"
ext.commonsnetVersion = "3.3"
ext.jsqlparserVersion = "4.12"
ext.slf4jVersion = "1.7.2"
ext.commonsfileuploadVersion = "1.3.1"
ext.jedisVersion = "2.7.2"
ext.solrjVersion = "5.4.0"
ext.freemarkerVersion = "2.3.23"
ext.quartzVersion = "2.2.2"
ext.fastjsonVersion = "1.2.28"
ext.swagger2Version = "2.6.1"
ext.lombokVersion = "1.16.16"
ext.fastdfsVersion = "1.24"
ext.beetl_starterVersion = "0.0.3"
ext.hutoolVersion = "3.0.3"
ext.swagger2Version = "2.6.1"
ext.logbackkafkaVersion = "0.1.0"
ext.apolloclientVersion = "0.8.0"
apply plugin: "java"
apply plugin: 'idea'
apply plugin: 'eclipse'
if (!(name.contains('common'))) {
apply plugin: 'org.springframework.boot'
}
apply plugin: 'docker'
repositories {
maven { url "http://localhost:8077/nexus/content/groups/public/" }
}
dependencies {
if (!(name.contains('common'))) {
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("junit:junit:${junitVersion}")
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
if (!((name.contains('common')) || (name.contains('api')) || (name == 'xbin-store-cloud'))) {
task buildDocker(type: Docker, dependsOn: bootRepackage) {
push = true
registry = dockerRegistry
applicationName = jar.baseName
dockerfile = file('Dockerfile')
doFirst {
copy {
from jar
into stageDir
}
}
}
}
if (name.contains('api')) {
tasks.remove(bootRepackage)
}
}
project("xbin-store-cloud-eureka") {
description = "xbin-store-cloud-eureka"
dependencies {
compile("org.springframework.cloud:spring-cloud-starter-eureka-server")
compile("com.github.danielwegener:logback-kafka-appender:${logbackkafkaVersion}")
}
}
//project("xbin-store-cloud-config") {
// description = "xbin-store-cloud-config"
//
// dependencies {
// compile("org.springframework.cloud:spring-cloud-starter-eureka")
// compile("org.springframework.cloud:spring-cloud-config-server")
// }
//}
project("xbin-store-cloud-zuul") {
description = "xbin-store-cloud-zuul"
dependencies {
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zuul")
}
}
project("xbin-store-cloud-turbine") {
description = "xbin-store-cloud-turbine"
dependencies {
compile("org.springframework.cloud:spring-cloud-starter-turbine")
compile("org.springframework.cloud:spring-cloud-starter-hystrix-dashboard")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.cloud:spring-cloud-starter-config")
}
}
project("xbin-store-cloud-sleuth") {
description = "xbin-store-cloud-sleuth"
dependencies {
compile("io.zipkin.java:zipkin-server")
compile("io.zipkin.java:zipkin-autoconfigure-ui")
}
}
project("xbin-store-cloud-admin") {
description = "xbin-store-cloud-admin"
dependencies {
compile("de.codecentric:spring-boot-admin-server:${springBootAdminVersion}")
compile("de.codecentric:spring-boot-admin-server-ui:${springBootAdminVersion}")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
}
}
project("xbin-store-cloud-common") {
description = "xbin-store-cloud-common"
dependencies {
compileOnly("javax.servlet:javax.servlet-api:${servletapiVersion}")
compileOnly("redis.clients:jedis:${jedisVersion}")
compile("org.apache.commons:commons-lang3:${commonslang3Version}")
compile("commons-lang:commons-lang:${commonslangVersion}")
compile("com.alibaba:fastjson:${fastjsonVersion}")
compile("org.csource:fastdfs:${fastdfsVersion}")
compile("org.slf4j:slf4j-api:${slf4jVersion}")
compile("io.springfox:springfox-swagger-ui:${swagger2Version}")
compile("io.springfox:springfox-swagger2:${swagger2Version}")
}
}
project("xbin-store-cloud-common-pojo") {
description = "xbin-store-cloud-common-pojo"
dependencies {
compileOnly("org.projectlombok:lombok:${lombokVersion}")
}
}
project("xbin-store-cloud-common-mapper") {
description = "xbin-store-cloud-common-mapper"
dependencies {
compile(project(":xbin-store-cloud-common-pojo"))
compile("mysql:mysql-connector-java:${mysqlVersion}")
compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${springBootMyBatisVersion}")
compile("com.github.pagehelper:pagehelper-spring-boot-starter:${springBootpagehelperVersion}")
compile("cn.binux:spring-boot-starter-druid:${springBootDruidVersion}")
compile fileTree(dir: 'src', includes: ['/*.xml'])
}
jar {
//指定包名
baseName = 'xbin-store-cloud-common-mapper'
//指定包含的文件
from('src/main/java') {
include '**/*.xml'
}
}
}
project("xbin-store-cloud-service-admin-api") {
description = "xbin-store-cloud-serviced-admin-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-admin") {
description = "xbin-store-cloud-service-admin-api"
dependencies {
compile(project(":xbin-store-cloud-service-admin-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-security")
compile("org.springframework.cloud:spring-cloud-starter-oauth2")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
}
bootRepackage {
mainClass = "cn.binux.XbinStoreServiceAdminApplication"
}
}
project("xbin-store-cloud-web-admin") {
description = "xbin-store-cloud-web-admin"
dependencies {
compile(project(":xbin-store-cloud-service-admin-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
compile("commons-fileupload:commons-fileupload:${commonsfileuploadVersion}")
}
}
project("xbin-store-cloud-service-search-api") {
description = "xbin-store-cloud-serviced-search-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-search") {
description = "xbin-store-cloud-service-search"
dependencies {
compile(project(":xbin-store-cloud-service-search-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.data:spring-data-solr")
}
}
project("xbin-store-cloud-web-search") {
description = "xbin-store-cloud-web-search"
dependencies {
compile(project(":xbin-store-cloud-service-search-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
}
}
project("xbin-store-cloud-service-portal-api") {
description = "xbin-store-cloud-serviced-portal-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-portal") {
description = "xbin-store-cloud-service-portal"
dependencies {
compile(project(":xbin-store-cloud-service-portal-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
}
}
project("xbin-store-cloud-web-portal") {
description = "xbin-store-cloud-web-portal"
dependencies {
compile(project(":xbin-store-cloud-service-portal-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
}
}
project("xbin-store-cloud-service-item-api") {
description = "xbin-store-cloud-serviced-item-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-item") {
description = "xbin-store-cloud-service-item"
dependencies {
compile(project(":xbin-store-cloud-service-item-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
compile("org.freemarker:freemarker:2.3.9")
}
}
project("xbin-store-cloud-web-item") {
description = "xbin-store-cloud-web-item"
dependencies {
compile(project(":xbin-store-cloud-service-item-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
}
}
project("xbin-store-cloud-service-cart-api") {
description = "xbin-store-cloud-serviced-cart-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-cart") {
description = "xbin-store-cloud-service-cart"
dependencies {
compile(project(":xbin-store-cloud-service-cart-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
compile("org.freemarker:freemarker:2.3.9")
}
}
project("xbin-store-cloud-web-cart") {
description = "xbin-store-cloud-web-cart"
dependencies {
compile(project(":xbin-store-cloud-service-cart-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
}
}
project("xbin-store-cloud-service-notify-api") {
description = "xbin-store-cloud-serviced-notify-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-notify") {
description = "xbin-store-cloud-service-notify"
dependencies {
compile(project(":xbin-store-cloud-service-notify-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
}
}
project("xbin-store-cloud-service-sso-api") {
description = "xbin-store-cloud-serviced-sso-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-sso") {
description = "xbin-store-cloud-service-sso"
dependencies {
compile(project(":xbin-store-cloud-service-sso-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
compile("org.freemarker:freemarker:2.3.9")
}
}
project("xbin-store-cloud-web-sso") {
description = "xbin-store-cloud-web-sso"
dependencies {
compile(project(":xbin-store-cloud-service-sso-api"))
compile(project(":xbin-store-cloud-service-notify-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
}
}
project("xbin-store-cloud-service-order-api") {
description = "xbin-store-cloud-serviced-order-api"
dependencies {
compile(project(":xbin-store-cloud-common"))
compile(project(":xbin-store-cloud-common-pojo"))
compile("org.springframework.cloud:spring-cloud-starter-feign")
}
}
project("xbin-store-cloud-service-order") {
description = "xbin-store-cloud-service-order"
dependencies {
compile(project(":xbin-store-cloud-service-order-api"))
compile(project(":xbin-store-cloud-service-sso-api"))
compile(project(":xbin-store-cloud-common-mapper"))
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
// compile("org.springframework.data:spring-data-redis") //暂时不使用
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
compile("org.freemarker:freemarker:2.3.9")
}
}
project("xbin-store-cloud-web-order") {
description = "xbin-store-cloud-web-order"
dependencies {
compile(project(":xbin-store-cloud-service-order-api"))
compile(project(":xbin-store-cloud-service-notify-api"))
compile(project(":xbin-store-cloud-service-sso-api"))
compile(project(":xbin-store-cloud-service-cart-api"))
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-starter-eureka")
compile("com.ctrip.framework.apollo:apollo-client:${apolloclientVersion}")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")
compile("org.springframework.cloud:spring-cloud-starter-zipkin")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.retry:spring-retry")
compile("com.piggsoft:beetl-spring-boot-starter:${beetl_starterVersion}")
compile("cn.binux:spring-boot-starter-redis:${springBootRedisVersion}")
}
}
configure(rootProject) {
description = "xbin-store-cloud"
// dependencyManagement {
// imports {
// mavenBom "io.projectreactor:reactor-bom"
// }
// resolutionStrategy {
// cacheChangingModulesFor 0, 'seconds'
// }
// applyMavenExclusions = false
// }
// don't publish the default jar for the root project
configurations.archives.artifacts.clear()
dependencies { // for integration tests
// testCompile(project(":spring-aop"))
}
// task buildDocker(type: Docker, dependsOn: bootRepackage) {
// push = true
// applicationName = jar.baseName
// dockerfile = file('Dockerfile')
// doFirst {
// copy {
// from jar
// into stageDir
// }
// }
// }
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化