/
build.gradle
53 lines (50 loc) · 1.43 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
plugins {
id 'ivy-publish'
}
group = 'org.gradle.sample'
version = '1.0'
publishing {
// tag::customize-descriptor[]
// tag::versions-resolved[]
publications {
ivyCustom(IvyPublication) {
// end::versions-resolved[]
descriptor {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
author {
name = 'Jane Doe'
url = 'http://example.com/users/jane'
}
description {
text = 'A concise description of my library'
homepage = 'http://www.example.com/library'
}
}
// tag::versions-resolved[]
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
// end::versions-resolved[]
// end::customize-descriptor[]
repositories {
ivy {
// change to point to your repo, e.g. http://my.org/repo
url layout.buildDirectory.dir('repo')
}
}
}
// tag::generate[]
generateDescriptorFileForIvyCustomPublication {
destination = layout.buildDirectory.file('generated-ivy.xml').get().asFile
}
// end::generate[]