forked from ic4j/ic4j-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload-github.gradle
42 lines (37 loc) · 1.21 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 plugin: 'maven-publish'
afterEvaluate {
publishing {
publications {
bar(MavenPublication) {
groupId = "$project.artifactGroupId"
artifactId = "$project.artifactId"
version = "$project.artifactVersion"
artifact jar
// from components.java
pom.withXml {
Node pomNode = asNode()
pomNode.dependencies.'*'.findAll() {
it.groupId.text() == project.artifactGroupId
}.each() {
it.parent().remove(it)
}
pomNode.dependencies.'*'.findAll() {
it.scope.text() == 'runtime'
}.each {
it.scope*.value = 'compile'
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tangem/ic4j-agent")
credentials {
username = "$githubUser"
password = "$githubPass"
}
}
}
}
}