blob: 0a06a1de446d11f4fb8dc92fba251fca6860f9db (
plain)
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
|
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
apply plugin: 'maven'
def pomName = "${libDir}/${project.name}-${project.version}.pom"
task writeNewPom {
outputs.file file(pomName)
} << {
pom {
project {
url 'https://zeroc.com'
packaging 'jar'
licenses {
license {
name 'GNU General Public License, version 2'
url 'https://www.gnu.org/licenses/gpl-2.0.html'
distribution 'repo'
}
}
}
}.writeTo(pomName)
}
jar.dependsOn(writeNewPom)
jar {
destinationDir = new File("${libDir}")
}
task jarSources(type:Jar, dependsOn: jar){
from sourceSets.main.allSource
classifier = 'source'
destinationDir = new File("${libDir}")
}
assemble.dependsOn(jarSources)
clean {
delete("${libDir}/${jar.archiveName}")
delete("${libDir}/${project.name}-${project.version}-source.jar")
delete(pomName)
}
task install(type: Copy, dependsOn: jarSources, overwrite: true) {
from "${pomName}"
from "${libDir}/${jar.archiveName}"
from "${libDir}/${project.name}-${project.version}-source.jar"
into "${DESTDIR}${jarDir}"
}
|