-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration to add `publishAllPublicationsToMavenCentralReposit…
…ory` task
- Loading branch information
1 parent
1604ed0
commit ef6c300
Showing
7 changed files
with
79 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,15 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent | |
import java.io.ByteArrayOutputStream | ||
import java.util.Date | ||
|
||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
id("org.jetbrains.kotlinx.kover") | ||
id("maven-publish") | ||
|
||
id("com.vanniktech.maven.publish").version("0.29.0") | ||
} | ||
|
||
val versionNumber: String by lazy { | ||
|
@@ -187,16 +191,36 @@ fun String.contentLine(length: Int, extraPadding: String = " ") = | |
fun tableLine(length: Int, leading: String, trailing: String) = | ||
"─".repeat(length - 2).wrapWith(leading, trailing) | ||
|
||
publishing { | ||
publications { | ||
register<MavenPublication>("release") { | ||
groupId = "com.flagsmith" | ||
artifactId = "flagsmith-kotlin-android-client" | ||
version = versionNumber | ||
mavenPublishing { | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) | ||
|
||
signAllPublications() | ||
|
||
coordinates("io.flagsmith.flagsmith-kotlin-android-client", "flagsmith-kotlin-android-client", versionNumber) | ||
|
||
afterEvaluate { | ||
from(components["release"]) | ||
pom { | ||
name.set("Flagsmith Kotlin Android Client") | ||
description.set("A library for integrating Flagsmith feature flagging.") | ||
inceptionYear.set("2024") | ||
url.set("https://github.com/flagsmith/flagsmith-kotlin-android-client/") | ||
licenses { | ||
license { | ||
name.set("BSD 3-Clause \"New\" or \"Revised\" License") | ||
url.set("https://github.com/Flagsmith/flagsmith-kotlin-android-client/blob/main/LICENSE") | ||
distribution.set("repo") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("flagsmith") | ||
name.set("Flagsmith") | ||
url.set("https://github.com/flagsmith/") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/flagsmith/flagsmith-kotlin-android-client/") | ||
connection.set("scm:git:git://github.com/flagsmith/flagsmith-kotlin-android-client.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/flagsmith/flagsmith-kotlin-android-client.git") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#Mon Jan 02 04:33:47 GMT 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters