-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed ths moudle name and add maven publish script
- Loading branch information
Showing
31 changed files
with
46 additions
and
14 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# MMKV-Kotlin Change Log | ||
|
||
## v1.0.0/2022-03-07 | ||
## v1.0.0/2022-04-19 | ||
|
||
* Initial Release | ||
* Based on `Kotlin 1.6.10`, `MMKV 1.2.12` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,19 @@ plugins { | |
id("com.android.library") | ||
id("kotlin-parcelize") | ||
id("maven-publish") | ||
signing | ||
} | ||
|
||
version = "1.0.0" | ||
group = "com.ctrip.flight.mmkv" | ||
|
||
val NEXUS_USERNAME: String by project | ||
val NEXUS_PASSWORD: String by project | ||
|
||
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) { | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
kotlin { | ||
android { | ||
publishLibraryVariants("release") | ||
|
@@ -24,20 +32,44 @@ kotlin { | |
} | ||
|
||
publishing { | ||
publications { | ||
val publicationsFromMainHost = listOf(android()).map { it.name } + "kotlinMultiplatform" | ||
matching { it.name in publicationsFromMainHost }.all { | ||
val targetPublication = this@all | ||
tasks.withType<AbstractPublishToMaven>() | ||
.matching { it.publication == targetPublication } | ||
.configureEach { onlyIf { findProperty("isMainHost") == "true" } } | ||
publications.withType<MavenPublication> { | ||
artifact(javadocJar) | ||
with(pom) { | ||
name.set("MMKV-Kotlin") | ||
description.set("MMKV for Kotlin Multiplatform") | ||
url.set("https://github.com/ctripcorp/mmkv-kotlin") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("qiaoyuang") | ||
name.set("Yuang Qiao") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/ctripcorp/mmkv-kotlin") | ||
connection.set("scm:git:https://github.com/ctripcorp/mmkv-kotlin.git") | ||
developerConnection.set("scm:git:https://github.com/ctripcorp/mmkv-kotlin.git") | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// 审核通过后补充... | ||
credentials { | ||
username = NEXUS_USERNAME | ||
password = NEXUS_PASSWORD | ||
} | ||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2") | ||
} | ||
} | ||
signing { | ||
sign(publishing.publications) | ||
} | ||
} | ||
|
||
cocoapods { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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