|
| 1 | +import com.vanniktech.maven.publish.SonatypeHost |
| 2 | + |
1 | 3 | plugins { |
2 | 4 | alias(libs.plugins.android.library) |
3 | 5 | alias(libs.plugins.kotlin.android) |
| 6 | + alias(libs.plugins.maven.publish) |
4 | 7 | } |
5 | 8 |
|
6 | 9 | val version = Versioning.loadVersioningData() |
7 | 10 | val verCode = version["code"] as Int |
8 | 11 | val verPublish = version["publish"] as String |
9 | 12 | val verGitSHA = version["gitSha"] as String |
10 | 13 |
|
11 | | -extra["PUBLISH_GROUP_ID"] = "com.plutolib.plugins" |
12 | | -extra["PUBLISH_ARTIFACT_ID"] = "bundle-core-no-op" |
13 | | -extra["PUBLISH_VERSION"] = verPublish |
14 | | - |
15 | 14 | android { |
16 | 15 | namespace = "com.pluto.plugins.bundle.core" |
17 | 16 | compileSdk = libs.versions.compileSdk.get().toInt() |
@@ -49,6 +48,45 @@ android { |
49 | 48 | } |
50 | 49 | } |
51 | 50 |
|
| 51 | +extra["PUBLISH_GROUP_ID"] = "com.androidpluto.plugins" |
| 52 | +extra["PUBLISH_ARTIFACT_ID"] = "bundle-core-no-op" |
| 53 | +extra["PUBLISH_ARTIFACT_NAME"] = "Android Pluto Plugin Bundle" |
| 54 | +extra["PUBLISH_ARTIFACT_DESCRIPTION"] = "Bundle module for Android Pluto plugins" |
| 55 | + |
| 56 | +mavenPublishing { |
| 57 | + coordinates( |
| 58 | + groupId = extra["PUBLISH_GROUP_ID"] as String, |
| 59 | + artifactId = extra["PUBLISH_ARTIFACT_ID"] as String, |
| 60 | + version = verPublish |
| 61 | + ) |
| 62 | + pom { |
| 63 | + name.set(extra["PUBLISH_ARTIFACT_NAME"] as String) |
| 64 | + description.set(extra["PUBLISH_ARTIFACT_DESCRIPTION"] as String) |
| 65 | + inceptionYear.set(project.findProperty("pom.inceptionYear") as? String) |
| 66 | + url.set(project.findProperty("pom.url") as? String) |
| 67 | + licenses { |
| 68 | + license { |
| 69 | + name.set(project.findProperty("pom.license.name") as? String) |
| 70 | + url.set(project.findProperty("pom.license.url") as? String) |
| 71 | + } |
| 72 | + } |
| 73 | + developers { |
| 74 | + developer { |
| 75 | + id.set(project.findProperty("pom.developer.id") as? String) |
| 76 | + name.set(project.findProperty("pom.developer.name") as? String) |
| 77 | + email.set(project.findProperty("pom.developer.email") as? String) |
| 78 | + } |
| 79 | + } |
| 80 | + scm { |
| 81 | + connection.set(project.findProperty("pom.scm.connection") as? String) |
| 82 | + developerConnection.set(project.findProperty("pom.scm.developerConnection") as? String) |
| 83 | + url.set(project.findProperty("pom.scm.url") as? String) |
| 84 | + } |
| 85 | + } |
| 86 | + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) |
| 87 | + signAllPublications() |
| 88 | +} |
| 89 | + |
52 | 90 | dependencies { |
53 | 91 | api(project(":pluto-plugins:plugins:exceptions:lib-no-op")) |
54 | 92 | api(project(":pluto-plugins:plugins:network:core:lib-no-op")) |
|
0 commit comments