Skip to content

Commit 179f2d3

Browse files
Add pom metadata (#25)
1 parent fb28462 commit 179f2d3

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

gradle/pom.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ext.pomMetadata = {
2+
pom {
3+
name = "Kronos"
4+
description = "An Open Source Kotlin SNTP library"
5+
url = "https://github.com/lyft/Kronos-Android"
6+
licenses {
7+
license {
8+
name = "The Apache License, Version 2.0"
9+
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
10+
distribution = "repo"
11+
}
12+
}
13+
developers {
14+
developer {
15+
id = "lyft"
16+
name = "Lyft Inc."
17+
email = "maven@lyft.com"
18+
}
19+
}
20+
scm {
21+
connection = "scm:git:git://github.com/lyft/Kronos-Android.git"
22+
developerConnection = "scm:git:ssh://git@github.com/lyft/Kronos-Android.git"
23+
url = "https://github.com/lyft/Kronos-Android.git"
24+
}
25+
}
26+
}

gradle/publish-android.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'org.jetbrains.dokka-android'
3+
apply from: "$rootProject.rootDir/gradle/pom.gradle"
34

45
task sourcesJar(type: Jar) {
56
from project.android.sourceSets.main.java.srcDirs
@@ -26,6 +27,8 @@ project.afterEvaluate {
2627
classifier "javadoc"
2728
}
2829

30+
with(pomMetadata)
31+
2932
pom.withXml {
3033
final dependencies = asNode().appendNode('dependencies')
3134

gradle/publish-java.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'maven-publish'
2+
apply from: "$rootProject.rootDir/gradle/pom.gradle"
23

34
task sourcesJar(type: Jar, dependsOn: classes) {
45
from sourceSets.main.allSource
@@ -23,6 +24,8 @@ publishing {
2324
artifact javadocJar {
2425
classifier "javadoc"
2526
}
27+
28+
with(pomMetadata)
2629
}
2730
}
2831
}

0 commit comments

Comments
 (0)