-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
41 lines (36 loc) · 1.09 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
40
41
def packageProperties = new Properties()
packageProperties.load(new FileInputStream(rootProject.file("package.properties")))
def localProperties = new Properties()
if(rootProject.file("local.properties").exists()) {
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
}
android {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
publishing {
publications {
release(MavenPublication) {
groupId packageProperties['group.id']
artifactId project.name
version packageProperties['version.name']
afterEvaluate {
from components.release
}
}
}
repositories {
maven {
name = "GithubPackages"
url = uri(packageProperties['url'])
credentials {
username = localProperties['github.username'] ?: System.getenv("GITHUB_ACTOR")
password = localProperties['github.token'] ?: System.getenv("GITHUB_TOKEN")
}
}
}
}