-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish-library.gradle
69 lines (62 loc) · 2.11 KB
/
publish-library.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
apply plugin: 'maven-publish'
apply plugin: 'signing'
task libraryKotlinSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.java.srcDirs
from sourceSets.main.kotlin.srcDirs
}
task javadocJar(type: Jar, dependsOn: dokkaHtml) {
archiveClassifier.set("javadoc")
from new File("${buildDir}/dokka/html")
}
artifacts {
archives libraryKotlinSourcesJar
archives javadocJar
}
group = PUBLISH_GROUP_ID
version = PUBLISH_VERSION
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
from components.java
artifact libraryKotlinSourcesJar
artifact javadocJar
pom {
name = PUBLISH_ARTIFACT_ID
description = 'Helper classes for dealing with async data loading easier'
url = 'https://github.com/romychab/container'
licenses {
license {
name = 'Apache License 2.0'
url = 'https://github.com/romychab/container/blob/main/LICENSE'
}
}
developers {
developer {
id = 'romychab'
name = 'Roman Andrushchenko'
email = 'rom.andrushchenko@gmail.com'
}
}
scm {
connection = 'scm:git:github.com/romychab/container.git'
developerConnection = 'scm:git:ssh://github.com/romychab/container.git'
url = 'https://github.com/romychab/container/tree/main'
}
}
}
}
}
}
signing {
useInMemoryPgpKeys(
rootProject.ext["signing.keyId"],
rootProject.ext["signing.key"],
rootProject.ext["signing.password"],
)
sign publishing.publications
}