forked from ExCiteS/apache-commons-codec-shaded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (46 loc) · 1.16 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
// This gradle file fetches commons-codec from mavenCentral, applies shadowing, and installs the result to the local Maven repository.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
def ccGroupId = 'commons-codec'
def ccArtifactId = ccGroupId
def ccsArtifactId = ccArtifactId + '-shaded'
def ccVersion = '1.11'
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
compile ccGroupId + ':' + ccArtifactId + ':' + ccVersion
}
shadowJar {
relocate 'org.apache.commons.codec', 'shaded.org.apache.commons.codec'
baseName = ccsArtifactId
version = ccVersion
classifier = null
}
publishing {
publications {
shadow(MavenPublication) { publication ->
groupId ccGroupId
artifactId ccsArtifactId
version ccVersion
project.shadow.component(publication)
}
}
repositories {
maven {
mavenLocal()
}
}
}
defaultTasks 'publishToMavenLocal'