forked from tangem/tangem-sdk-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload-github.gradle
42 lines (38 loc) · 1.4 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"
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/c0c41n/tangem-sdk-android")
credentials {
username = System.getenv("GIT_TANGEM_USER")
password = System.getenv("GIT_TANGEM_TOKEN")
}
}
}
}
}