diff --git a/libraries/kotlinx-metadata/jvm/build.gradle.kts b/libraries/kotlinx-metadata/jvm/build.gradle.kts index b35acb3259a..f308be26fff 100644 --- a/libraries/kotlinx-metadata/jvm/build.gradle.kts +++ b/libraries/kotlinx-metadata/jvm/build.gradle.kts @@ -6,8 +6,19 @@ plugins { kotlin("jvm") } -// Change this version before publishing -version = "0.1-SNAPSHOT" +/* + * To publish this library use `:kotlinx-metadata-jvm:publish` task and specify the following parameters + * + * - `-PdeployVersion=1.2.nn`: the version of the standard library dependency to put into .pom + * - `-PkotlinxMetadataDeployVersion=0.0.n`: the version of the library itself + * - `-PdeployRepoUrl=repository_url`: (optional) the url of repository to deploy to; + * if not specified, the local directory repository `build/repo` will be used + * - `-PdeployRepoUsername=username`: (optional) the username to authenticate in the deployment repository + * - `-PdeployRepoPassword=password`: (optional) the password to authenticate in the deployment repository + */ +group = "org.jetbrains.kotlinx" +val deployVersion = findProperty("kotlinxMetadataDeployVersion") as String? +version = deployVersion ?: "0.1-SNAPSHOT" sourceSets { "main" { projectDefault() } @@ -59,7 +70,10 @@ sourcesJar { } javadocJar() -// publish() + +if (deployVersion != null) { + publish() +} projectTest { workingDir = rootDir