plugins { id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false id "org.springframework.boot" version "2.1.4.RELEASE" apply false } allprojects { group 'com.usoftchina.uas' version '2.0.0-SNAPSHOT' } subprojects { Project subproject -> if (subproject.hasProperty('projVersion')) { subproject.version = subproject.projVersion } else { subproject.version = '2.0.0-SNAPSHOT' } apply plugin: 'java' apply plugin: 'idea' apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'io.spring.dependency-management' sourceCompatibility = 1.8 targetCompatibility = 1.8 [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8' ext { springBootVersion = '2.1.4.RELEASE' // dependencies ojdbc = 'com.oracle:ojdbc6:11.2.0' fastjson = 'com.alibaba:fastjson:1.2.47' threadLocal = 'com.alibaba:transmittable-thread-local:2.2.0' // repoBaseUrl = "https://maven.ubtob.net/artifactory" repoBaseUrl = "http://10.1.81.211:1202/artifactory" snapshotUrl = "$repoBaseUrl/libs-snapshot-local" releaseUrl = "$repoBaseUrl/libs-release-local" } repositories { mavenLocal() mavenCentral() maven { url "https://repo.spring.io/libs-milestone" } maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } maven { url "https://maven.ubtob.net/artifactory/libs-snapshot-local" credentials { username 'admin' password 'Admin2020yourkj2021' } } maven { url "https://maven.ubtob.net/artifactory/libs-release-local" credentials { username 'admin' password 'Admin2020yourkj2021' } } maven { url "https://maven.ubtob.net/artifactory/ext-release-local" credentials { username 'admin' password 'Admin2020yourkj2021' } } } dependencyManagement { imports { mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}" } } 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 project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl credentials { username = 'admin' password = 'Admin2020yourkj2021' } } } } }