mirror of
https://github.com/jellyfin/jellyfin-androidx-media.git
synced 2024-11-27 00:10:36 +00:00
Fix snapshot publishing (#4)
This commit is contained in:
parent
98ab3de282
commit
db20b24984
@ -31,12 +31,16 @@ allprojects {
|
||||
}
|
||||
|
||||
// Add Sonatype publishing repository
|
||||
nexusPublishing.repositories.sonatype {
|
||||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
||||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
||||
nexusPublishing {
|
||||
repositories.sonatype {
|
||||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
||||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
||||
|
||||
username.set(getProperty("ossrh.username"))
|
||||
password.set(getProperty("ossrh.password"))
|
||||
username.set(getProperty("ossrh.username"))
|
||||
password.set(getProperty("ossrh.password"))
|
||||
}
|
||||
|
||||
useStaging.set(project.provider { project.version.toString() != SNAPSHOT_VERSION })
|
||||
}
|
||||
|
||||
tasks.wrapper {
|
||||
|
@ -12,11 +12,13 @@ fun Project.getProperty(name: String): String? {
|
||||
return value
|
||||
}
|
||||
|
||||
const val SNAPSHOT_VERSION = "SNAPSHOT"
|
||||
|
||||
/**
|
||||
* Helper function to create the library version using the `jellyfin.version` property.
|
||||
* Uses [getProperty] to retrieve the properties. Defaults to `-SNAPSHOT` if no property is set.
|
||||
*/
|
||||
fun Project.createVersion(): String {
|
||||
val jellyfinVersion = getProperty("jellyfin.version")?.removePrefix("v")
|
||||
return jellyfinVersion ?: "SNAPSHOT"
|
||||
return jellyfinVersion ?: SNAPSHOT_VERSION
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user