-
Notifications
You must be signed in to change notification settings - Fork 1
/
publish.gradle
40 lines (36 loc) · 953 Bytes
/
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
apply from: file("$rootDir/version.gradle")
apply plugin: 'maven-publish'
// gradle publish ... for my needs
File propsFile = file("$rootDir/maven-url.properties")
if (propsFile.exists()) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
if(props['sync_framework_maven'] != null)
sync_framework_maven_url = props['sync_framework_maven']
}
publishing {
publications {
release(MavenPublication) {
groupId 'pl.selvin.android'
version sync_framework_version
artifactId sync_framework_artifact_id
afterEvaluate {
from components.release
}
}
}
repositories {
maven {
url sync_framework_maven_url
}
if (System.getenv("GITHUB_ACTOR") != null)
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/selvinpl/syncframeworkandroid"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}