Skip to content

Commit 5a67bbd

Browse files
committed
Add Maven-publish plaging config
1 parent 05b904b commit 5a67bbd

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ plugins {
22
alias(libs.plugins.kotlin) apply false
33
alias(libs.plugins.android.application) apply false
44
alias(libs.plugins.android.library) apply false
5+
id("com.vanniktech.maven.publish") version "0.25.3" apply false
56
}

perfsuite/build.gradle.kts

+46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
alias(libs.plugins.kotlin)
35
alias(libs.plugins.android.library)
6+
id("com.vanniktech.maven.publish")
47
}
58

69
kotlin {
@@ -26,3 +29,46 @@ dependencies {
2629
implementation(libs.androidx.ktx)
2730
implementation(libs.androidx.fragment)
2831
}
32+
33+
// publishing
34+
35+
val libName = "PerfSuite"
36+
val libDescription = "Lightweight library for collecting app performance metrics"
37+
val libUrl = "https://github.com/bookingcom/perfsuite-android"
38+
39+
40+
val groupId = project.group as String
41+
val artifactId = project.name as String
42+
val version = project.version as String
43+
44+
@Suppress("UnstableApiUsage")
45+
mavenPublishing {
46+
publishToMavenCentral(SonatypeHost.DEFAULT, true)
47+
signAllPublications()
48+
49+
coordinates(groupId, artifactId, version)
50+
51+
pom {
52+
name.set(libName)
53+
description.set(libDescription)
54+
url.set(libUrl)
55+
56+
licenses {
57+
license {
58+
name.set("The Apache License, Version 2.0")
59+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
60+
}
61+
}
62+
scm {
63+
connection.set("scm:git:github.com/bookingcom/perfsuite-android.git")
64+
developerConnection.set("scm:git:ssh://github.com/bookingcom/perfsuite-android.git")
65+
url.set("https://github.com/bookingcom/perfsuite-android")
66+
}
67+
developers {
68+
developer {
69+
name.set("Vadim Chepovskii")
70+
email.set("[email protected]")
71+
}
72+
}
73+
}
74+
}

0 commit comments

Comments
 (0)