-
Notifications
You must be signed in to change notification settings - Fork 39
/
upload-github.gradle
42 lines (38 loc) · 1.38 KB
/
upload-github.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
apply from: '../artifactConfig.gradle'
apply plugin: 'maven-publish'
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId = "$artifactConfig.group"
artifactId = "$project.artifactId"
version = "$artifactConfig.version".replace("/", "-")
if (artifactId == "android") {
from components.release
artifact(sourceJar)
pom.withXml {
Node pomNode = asNode()
pomNode.dependencies.'*'.findAll() {
it.groupId.text() == artifactConfig.group
}.each() { it.parent().remove(it) }
pomNode.dependencies.'*'.findAll() {
it.scope.text() == 'runtime'
}.each { it.scope*.value = 'compile' }
}
} else if (artifactId == "core") {
from components.java
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tangem/tangem-sdk-android")
credentials {
username = "$githubUser"
password = "$githubPass"
}
}
}
}
}