forked from divkit/divkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.internal.gradle
95 lines (84 loc) · 2.91 KB
/
publish.internal.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import com.yandex.div.gradle.PublicationType
afterEvaluate {
if (rootProject.ext.publishToMavenCentral) {
signing {
sign publishing.publications
sign configurations.archives
}
}
publishing {
if (rootProject.ext.publishToBucket) {
repositories {
maven {
name 'bucket'
credentials {
username rootProject.ext.bucketUsername
password rootProject.ext.bucketPassword
}
def releaseUrl = "https://bucket.yandex-team.ru/v1/maven/yandex_mobile_releases/"
def snapshotUrl = "https://bucket.yandex-team.ru/v1/maven/yandex_mobile_snapshots/"
url = (rootProject.ext.publicationType == PublicationType.@release) ? releaseUrl : snapshotUrl
}
}
}
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'
}
}
}
}
task sourcesJar(type: Jar) {
archiveClassifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
artifact sourcesJar
artifact javadocJar
from components.java
version divkitVersionName
}
}
}
}
if (publishToBucket) {
allprojects {
afterEvaluate {
if (plugins.hasPlugin("maven-publish")) {
project.tasks.withType(PublishToMavenRepository) { task ->
publishInternalRelease.dependsOn(task)
}
}
}
}
}