plugins { id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false id "org.springframework.boot" version "2.1.4.RELEASE" apply false id "io.freefair.lombok" version "5.0.0-rc4" apply false id 'com.bmuschko.docker-spring-boot-application' version '6.3.0' apply false } allprojects { group 'com.usoftchina.saas' version '1.0.0-SNAPSHOT' } def env = System.getProperty("profile") ?: "dev" subprojects { Project subproject -> if (!subproject.name.matches(".*-(core|common|api|service|dto|server|client|sdk|starter|task)")) { return } if (env == "dev") { subproject.version = '1.0.0.SNAPSHOT' } else { subproject.version = '1.0.0.RELEASE' } apply plugin: 'java' apply plugin: 'idea' apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'io.spring.dependency-management' apply plugin: 'io.freefair.lombok' sourceCompatibility = 1.8 targetCompatibility = 1.8 [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8' ext { springBootVersion = '2.1.4.RELEASE' // dependencies alibabaThreadLocal = 'com.alibaba:transmittable-thread-local:2.10.2' mysqlConnector = 'mysql:mysql-connector-java:6.0.6' mybatisSpringBoot = 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1' pageHelperSpringBoot = 'com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7' fastjson = 'com.alibaba:fastjson:1.2.47' guava = 'com.google.guava:guava:18.0' fastdfs = 'com.github.tobato:fastdfs-client:1.26.3' commonCompress = 'org.apache.commons:commons-compress:1.18' jjwt = 'io.jsonwebtoken:jjwt:0.7.0' poi = 'org.apache.poi:poi-ooxml:3.17' zxing = 'com.google.zxing:javase:3.3.0' aliyunSmsCore = 'com.aliyun:aliyun-java-sdk-core:4.0.3' qcloudSmsSdk = 'com.github.qcloudsms:qcloudsms:1.0.6' repoBaseUrl = "http://maven.ubtob.com/artifactory" snapshotUrl = "$repoBaseUrl/libs-snapshot-local" releaseUrl = "$repoBaseUrl/libs-release-local" dockerGroup = System.properties['dockerGroup'] dockerRegistry = env == 'dev' ? '10.1.81.48:4000' : '10.10.100.200:5000' } repositories { mavenLocal() maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } maven { url "https://repo.spring.io/libs-milestone" } maven { url "http://maven.ubtob.com/artifactory/libs-release-local" } maven { url "http://maven.ubtob.com/artifactory/libs-snapshot-local" } maven { url "http://maven.ubtob.com/artifactory/ext-release-local" } maven { url "https://artifactory.uuzcc.cn/artifactory/libs-snapshot-local" } mavenCentral() } dependencyManagement { imports { mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}" } } lombok { config['lombok.equalsAndHashCode.callSuper'] = 'call' } task sourcesJar(type: Jar) { from sourceSets.main.allJava classifier 'sources' } artifacts { archives sourcesJar } publishing { publications { plugins(MavenPublication) { from components.java artifact sourcesJar } } repositories { maven { url subproject.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl credentials { username = 'yingp' password = '111111' } } } } }