-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added support for Maven publication * Optimized signing order * Added KodeView to versions * Bumped to maven version * Added more sections to README.md * Corrected examples section
- Loading branch information
Showing
9 changed files
with
183 additions
and
147 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
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
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
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,10 +4,11 @@ plugins { | |
alias(libs.plugins.android.library) | ||
alias(libs.plugins.compose) | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
group = "dev.snipme" | ||
version = "0.4.0" | ||
version = "0.5.0" | ||
|
||
android { | ||
namespace = "dev.snipme.kodeview" | ||
|
@@ -44,58 +45,6 @@ kotlin { | |
} | ||
} | ||
|
||
publishing { | ||
val emptyJar = tasks.register<Jar>("emptyJar") { | ||
archiveAppendix.set("empty") | ||
} | ||
|
||
publications.forEach { | ||
val publication = it as? MavenPublication ?: return@forEach | ||
|
||
publication.artifact(emptyJar) { | ||
classifier = "javadoc" | ||
} | ||
|
||
publication.pom.withXml { | ||
val root = asNode() | ||
root.appendNode("name", "kodeview") | ||
root.appendNode( | ||
"description", | ||
"Kotlin Multiplatform syntax highlighting views" | ||
) | ||
root.appendNode("url", "https://github.com/SnipMeDev/KodeView") | ||
|
||
root.appendNode("licenses").apply { | ||
appendNode("license").apply { | ||
appendNode("name", "The Apache Software License, Version 2.0") | ||
appendNode("url", "https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
appendNode("distribution", "repo") | ||
} | ||
} | ||
|
||
root.appendNode("developers").apply { | ||
appendNode("developer").apply { | ||
appendNode("id", "tkadziolka") | ||
appendNode("name", "Tomasz Kądziołka") | ||
appendNode("email", "[email protected]") | ||
} | ||
} | ||
|
||
root.appendNode("scm").apply { | ||
appendNode( | ||
"connection", | ||
"scm:git:ssh://[email protected]:SnipMeDev/KodeView.git" | ||
) | ||
appendNode( | ||
"developerConnection", | ||
"scm:git:ssh://[email protected]:SnipMeDev/KodeView.git", | ||
) | ||
appendNode("url", "https://github.com/SnipMeDev/KodeView") | ||
} | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
// Common | ||
val commonMain by getting { | ||
|
@@ -135,3 +84,73 @@ kotlin { | |
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"] as String, | ||
rootProject.ext["signing.key"] as String, | ||
rootProject.ext["signing.password"] as String | ||
) | ||
sign(publishing.publications) | ||
} | ||
|
||
publishing { | ||
val emptyJar = tasks.register<Jar>("emptyJar") { | ||
archiveAppendix.set("empty") | ||
} | ||
|
||
publications.forEach { | ||
val publication = it as? MavenPublication ?: return@forEach | ||
|
||
publication.artifact(emptyJar) { | ||
classifier = "javadoc" | ||
} | ||
|
||
publication.pom.withXml { | ||
val root = asNode() | ||
root.appendNode("name", "kodeview") | ||
root.appendNode( | ||
"description", | ||
"Kotlin Multiplatform syntax highlighting views" | ||
) | ||
root.appendNode("url", "https://github.com/SnipMeDev/KodeView") | ||
|
||
root.appendNode("licenses").apply { | ||
appendNode("license").apply { | ||
appendNode("name", "The Apache Software License, Version 2.0") | ||
appendNode("url", "https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
appendNode("distribution", "repo") | ||
} | ||
} | ||
|
||
root.appendNode("developers").apply { | ||
appendNode("developer").apply { | ||
appendNode("id", "tkadziolka") | ||
appendNode("name", "Tomasz Kądziołka") | ||
appendNode("email", "[email protected]") | ||
} | ||
} | ||
|
||
root.appendNode("scm").apply { | ||
appendNode( | ||
"connection", | ||
"scm:git:ssh://[email protected]:SnipMeDev/KodeView.git" | ||
) | ||
appendNode( | ||
"developerConnection", | ||
"scm:git:ssh://[email protected]:SnipMeDev/KodeView.git", | ||
) | ||
appendNode("url", "https://github.com/SnipMeDev/KodeView") | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<PublishToMavenRepository> { | ||
dependsOn(":kodeview:signIosSimulatorArm64Publication") | ||
dependsOn(":kodeview:signIosArm64Publication") | ||
dependsOn(":kodeview:signIosX64Publication") | ||
dependsOn(":kodeview:signJvmPublication") | ||
dependsOn(":kodeview:signJsPublication") | ||
dependsOn(":kodeview:signKotlinMultiplatformPublication") | ||
} |
Oops, something went wrong.