-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.gradle
39 lines (34 loc) · 1.03 KB
/
publish.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
apply plugin: 'maven-publish'
def githubProperties = new Properties()
if (file("github_credentials.properties").file) {
githubProperties.load(new FileInputStream(rootProject.file("github_credentials.properties")))
}
def getVersionName = { ->
return "0.0.1"
}
def getGroupId = { ->
return "com.test.android"
}
def getArtifactId = { ->
return "testlibraryprod"
}
publishing {
publications {
bar(MavenPublication) {
groupId getGroupId()
artifactId getArtifactId()
version getVersionName()
artifact("$buildDir/outputs/aar/${getArtifactId()}-release.aar")
}
}
repositories {
maven {
name = "Teste Package"
url = uri("https://maven.pkg.github.com/mlcsouza/testPublishPackage")
credentials {
username = githubProperties['github.username'] ?: System.getenv("GITHUB_USERNAME")
password = githubProperties['github.password'] ?: System.getenv("GITHUB_API_KEY")
}
}
}
}