forked from sxfad/config-keeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (57 loc) · 2.1 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
buildscript {
ext {
sxGradleHome = "https://github.com/sxfad/gradle-scripts/raw/master/"
REPOSITORY_HOME = 'http://maven.aliyun.com' // maven需要改为公司内部的仓库
REPOSITORY_URL = REPOSITORY_HOME + "/nexus/content/groups/public"
swaggerVersion = "2.8.0"
}
apply from: sxGradleHome + 'spring-cloud-edgware.gradle'
repositories {
maven { url REPOSITORY_URL }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
version = '1.2.0'
group = 'com.suixingpay.config-keeper'
description = '配置中心'
apply plugin: 'maven'
allprojects {
repositories {// 使用 mavenCentral()时,将远程的仓库替换为自己搭建的仓库
all {ArtifactRepository repo ->
// println repo.url.toString()
def url = repo.url.toString()
if (repo instanceof MavenArtifactRepository && (url.startsWith("https://repo1.maven.org/maven2") || url.startsWith('https://jcenter.bintray.com/'))) {
project.logger.warn "Repository ${repo.url} removed."
remove repo
} else {
// println "maven url:" + url
}
}
maven {
url REPOSITORY_URL
}
}
uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: REPOSITORY_HOME + "/nexus/content/repositories/snapshots/") {
authentication(userName: 'xxx', password: 'xxx')
}
repository(url: REPOSITORY_HOME + "/nexus/content/repositories/releases/") {
authentication(userName: 'xxx', password: 'xxx')
}
}
}
}
}
subprojects {
apply from: sxGradleHome + 'spring-cloud.gradle'
dependencies {
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
compileOnly("org.projectlombok:lombok")
testCompile('org.projectlombok:lombok')
testCompile("org.springframework.boot:spring-boot-configuration-processor")
}
}