From d86947207cd25b2a5ceb3ae1dcddbd5f6b9787f7 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Sun, 27 May 2018 16:08:41 +0300 Subject: [PATCH] Change group of kotlinx.metadata to org.jetbrains.kotlinx Allow to override version of the resulting artifact with a property. Setup publishing of the library when its deployment version is specified. --- .../kotlinx-metadata/jvm/build.gradle.kts | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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