/
build.gradle
48 lines (42 loc) · 1.07 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
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenCentral()
}
publishing {
repositories {
maven {
url = "${rootProject.buildDir}/repo" // change to point to your repo, e.g. http://my.org/repo
}
}
}
dependencies {
api 'org.slf4j:slf4j-api:1.7.10'
}
// tag::specify-relocation[]
publishing {
publications {
// ... artifact publications
// Specify relocation POM
relocation(MavenPublication) {
pom {
// Old artifact coordinates
groupId = "com.example"
artifactId = "lib"
version = "2.0.0"
distributionManagement {
relocation {
// New artifact coordinates
groupId = "com.new-example"
artifactId = "lib"
version = "2.0.0"
message = "groupId has been changed"
}
}
}
}
}
}
// end::specify-relocation[]