forked from tangem/tangem-sdk-android-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload-github.gradle
More file actions
31 lines (27 loc) · 1.04 KB
/
upload-github.gradle
File metadata and controls
31 lines (27 loc) · 1.04 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
apply from: '../artifactConfig.gradle'
apply plugin: 'maven-publish'
afterEvaluate {
println "Project1: ${project.name}, artifactId from properties: '${project.artifactId}'"
publishing {
publications {
maven(MavenPublication) {
groupId = "$artifactConfig.group"
artifactId = "$project.artifactId"
if (artifactId == "android") {
from components.release
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
}
}
}
}
}