12
12
*/
13
13
14
14
apply plugin : ' java'
15
- apply plugin : " eu.appsatori.fatjar"
16
15
apply plugin : ' maven'
17
16
apply plugin : ' signing'
17
+ apply plugin : ' com.github.johnrengelman.shadow'
18
18
19
19
group = ' com.sendgrid'
20
20
version = ' 4.0.0'
@@ -37,12 +37,10 @@ task wrapper(type: Wrapper) {
37
37
38
38
buildscript {
39
39
dependencies {
40
- classpath ' eu.appsatori: gradle-fatjar-plugin:0.3 ' // adds fatJar task
40
+ classpath ' com.github.jengelman. gradle.plugins:shadow:1.2.4 '
41
41
}
42
42
repositories {
43
- maven {
44
- url " https://plugins.gradle.org/m2/"
45
- }
43
+ jcenter()
46
44
}
47
45
}
48
46
@@ -66,33 +64,36 @@ allprojects {
66
64
}
67
65
}
68
66
69
- // adds 'with-dependencies' to the fatJar name
70
- fatJar {
67
+ // adds 'with-dependencies' to the shadowJar name
68
+ shadowJar {
71
69
classifier ' jar'
72
70
baseName " sendgrid-java-http-client"
71
+ version version
72
+ }
73
+ jar {
73
74
manifest {
74
75
attributes(" Implementation-Title" : " http" , " Implementation-Version" : version)
75
76
}
76
77
}
77
78
78
- // copy fatJar to base project directory so they will be in git (and on github for download)
79
+ // copy shadowJar to base project directory so they will be in git (and on github for download)
79
80
build << {
80
81
copy {
81
- println " Copying ${ fatJar .archiveName} to $projectDir /repo/com/sendgrid/$version "
82
- from(" $buildDir /libs/${ fatJar .archiveName} " )
82
+ println " Copying ${ shadowJar .archiveName} to $projectDir /repo/com/sendgrid/$version "
83
+ from(" $buildDir /libs/${ shadowJar .archiveName} " )
83
84
into(" $projectDir /repo/com/sendgrid/$version " )
84
85
}
85
86
copy {
86
- println " Copying ${ fatJar .archiveName} to $projectDir /repo/com/sendgrid"
87
- from(" $buildDir /libs/${ fatJar .archiveName} " )
87
+ println " Copying ${ shadowJar .archiveName} to $projectDir /repo/com/sendgrid"
88
+ from(" $buildDir /libs/${ shadowJar .archiveName} " )
88
89
into(" $projectDir /repo/com/sendgrid" )
89
90
}
90
91
tasks. renameSendGridVersionJarToSendGridJar. execute()
91
92
}
92
93
93
94
task renameSendGridVersionJarToSendGridJar {
94
95
doLast {
95
- file(" $projectDir /repo/com/sendgrid/${ fatJar .archiveName} " ). renameTo(file(" $projectDir /repo/com/sendgrid/http-jar.jar" ))
96
+ file(" $projectDir /repo/com/sendgrid/${ shadowJar .archiveName} " ). renameTo(file(" $projectDir /repo/com/sendgrid/http-jar.jar" ))
96
97
}
97
98
}
98
99
@@ -151,7 +152,7 @@ uploadArchives {
151
152
}
152
153
153
154
artifacts {
154
- archives fatJar
155
+ archives shadowJar
155
156
archives jar
156
157
archives javadocJar
157
158
archives sourcesJar
0 commit comments