mirror of
https://github.com/bitsycore/pulse-mvi.git
synced 2026-10-05 12:07:26 +00:00
46 lines
1.3 KiB
Kotlin
46 lines
1.3 KiB
Kotlin
apply(plugin = "maven-publish")
|
|
|
|
project.group = providers.gradleProperty("pulse.group").get() as String
|
|
project.version = rootProject.extra["pulseVersion"] as String
|
|
|
|
project.afterEvaluate {
|
|
the<PublishingExtension>().apply {
|
|
repositories {
|
|
// Local Maven for snapshots: ./gradlew publishToMavenLocal
|
|
mavenLocal()
|
|
|
|
// Remote Maven for releases: ./gradlew publish
|
|
// Configure credentials via gradle.properties or environment variables:
|
|
// pulse.maven.url, pulse.maven.username, pulse.maven.password
|
|
val mavenUrl = rootProject.findProperty("pulse.maven.url") as? String
|
|
if (mavenUrl != null) {
|
|
maven {
|
|
name = "remote"
|
|
url = uri(mavenUrl)
|
|
credentials {
|
|
username = rootProject.findProperty("pulse.maven.username") as? String
|
|
?: System.getenv("PULSE_MAVEN_USERNAME") ?: ""
|
|
password = rootProject.findProperty("pulse.maven.password") as? String
|
|
?: System.getenv("PULSE_MAVEN_PASSWORD") ?: ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publications.withType<MavenPublication>().configureEach {
|
|
pom {
|
|
name.set(project.name)
|
|
description.set("Pulse MVI - ${project.name}")
|
|
url.set("https://github.com/bitsycore/PulseMVI")
|
|
licenses {
|
|
license {
|
|
name.set("MIT License")
|
|
url.set("https://opensource.org/licenses/MIT")
|
|
distribution.set("repo")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|