forked from divkit/divkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish-common.gradle
More file actions
83 lines (70 loc) · 2.55 KB
/
Copy pathpublish-common.gradle
File metadata and controls
83 lines (70 loc) · 2.55 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import com.yandex.div.gradle.FileExtensions
import com.yandex.div.gradle.PublicationType
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = 'com.yandex.div'
ext {
publicationType = PublicationType.fromString(rootProject.findProperty("publicationType"))
signingKeyId = rootProject.findProperty("signingKeyId")
signingPassword = rootProject.findProperty("signingPassword")
signingSecretKeyRingFile = rootProject.findProperty("signingSecretKeyRingFile")
commitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'arc', 'rev-parse', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
}
def publishToMavenCentral = rootProject.ext.has("publishToMavenCentral") && rootProject.ext.publishToMavenCentral
if (publishToMavenCentral) {
rootProject.ext {
signing {
keyId = signingKeyId
password = signingPassword
secretKeyRingFile = signingSecretKeyRingFile
}
}
}
afterEvaluate {
if (publishToMavenCentral) {
signing {
sign publishing.publications
sign configurations.archives
}
}
publishing {
publications {
release(MavenPublication) {
pom {
name = "DivKit"
description = "DivKit is an open source Server-Driven UI (SDUI) framework. SDUI is a an emerging technique that leverage the server to build the user interfaces of their mobile app."
url = "http://divkit.tech/"
licenses {
license {
name = "Apache License, version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0"
distribution = "repo"
}
}
scm {
connection = "scm:git://github.com/divkit/divkit.git"
developerConnection = "scm:git://github.com/divkit/divkit.git"
url = "https://github.com/divkit/divkit.git"
}
developers {
developer {
name = "Yandex"
url = "http://divkit.tech/"
}
}
}
ext.repo = 'release'
}
}
}
}
FileExtensions.ifExists("${buildscript.sourceFile.parent}/publish-common.internal.gradle") {
apply from: it
}