-
Notifications
You must be signed in to change notification settings - Fork 9
/
deploy.gradle
36 lines (34 loc) · 1.55 KB
/
deploy.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
apply plugin: 'maven-publish'
publishing {
repositories {
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/kkiapay/android-sdk")
credentials {
username = System.getenv('GITHUB_USER') //?: githubProperties['GITHUB_USER']
password = System.getenv('GITHUB_PERSONAL_ACCESS_TOKEN') //?: githubProperties['GITHUB_PERSONAL_ACCESS_TOKEN']
}
}
}
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/lib-release.aar")
groupId 'co.opensi.kkiapay' // replace with your groupId
artifactId 'kkiapay' // replace with your artifactId
version "1.4.0"
//The publication doesn't know about our dependencies, so we have to manually add them to the pom
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}