From 79eb854093016ff845f80719f214f7b625ceb9de Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 2 May 2021 21:20:08 -0700 Subject: [PATCH] Added support for snapshot. --- build.gradle.kts | 14 +++++++++----- examples/build.gradle.kts | 2 +- pom.xml | 4 ++-- version.properties | 6 +++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4fe01ff..47c680a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,13 +7,13 @@ plugins { `maven-publish` signing id("com.github.ben-manes.versions") version "0.38.0" - id("io.gitlab.arturbosch.detekt") version "1.16.0" + id("io.gitlab.arturbosch.detekt") version "1.17.0-RC1" id("net.thauvin.erik.gradle.semver") version "1.0.4" id("org.jetbrains.dokka") version "1.4.32" id("org.jetbrains.kotlin.jvm") version "1.5.0" id("org.jetbrains.kotlin.kapt") version "1.5.0" id("org.jetbrains.kotlin.plugin.serialization") version "1.5.0" - id("org.sonarqube") version "3.1.1" + id("org.sonarqube") version "3.2.0" } group = "net.thauvin.erik" @@ -36,7 +36,6 @@ val versions: VersionInfo by extra { VersionInfo } repositories { mavenCentral() - jcenter() // needed for Dokka maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } } @@ -49,7 +48,7 @@ dependencies { implementation("com.squareup.okhttp3:okhttp:${versions.okhttp}") implementation("com.squareup.okhttp3:logging-interceptor:${versions.okhttp}") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc-218") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc") testImplementation("org.mockito:mockito-core:3.9.0") testImplementation("org.testng:testng:7.4.0") } @@ -61,6 +60,7 @@ kapt { } detekt { + toolVersion = "main-SNAPSHOT" baseline = project.rootDir.resolve("config/detekt/baseline.xml") } @@ -235,7 +235,11 @@ publishing { repositories { maven { name = "ossrh" - url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + project.afterEvaluate { + url = if (project.version.toString().contains("SNAPSHOT")) + uri("https://oss.sonatype.org/content/repositories/snapshots/") else + uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + } credentials(PasswordCredentials::class) } } diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 69bd871..c573336 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -16,7 +16,7 @@ repositories { dependencies { implementation("javax.servlet:javax.servlet-api:4.0.1") - implementation("net.thauvin.erik:akismet-kotlin:0.9.3") + implementation("net.thauvin.erik:akismet-kotlin:0.9.3-SNAPSHOT") } application { diff --git a/pom.xml b/pom.xml index 9eab848..8cd1f7c 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 net.thauvin.erik akismet-kotlin - 0.9.3 + 0.9.3-SNAPSHOT akismet-kotlin Akismet for Kotlin/Java, a client library for accessing the Automattic Kismet (Akismet) spam comments filtering service. https://github.com/ethauvin/akismet-kotlin @@ -63,7 +63,7 @@ org.jetbrains.kotlinx kotlinx-serialization-runtime-jvm - 1.0-M1-1.4.0-rc-218 + 1.0-M1-1.4.0-rc runtime diff --git a/version.properties b/version.properties index a3c7f64..eb0e23b 100644 --- a/version.properties +++ b/version.properties @@ -1,9 +1,9 @@ #Generated by the Semver Plugin for Gradle -#Sun Mar 21 16:17:41 PDT 2021 +#Sun May 02 22:00:05 PDT 2021 version.buildmeta= version.major=0 version.minor=9 version.patch=3 -version.prerelease= +version.prerelease=SNAPSHOT version.project=Akismet Kotlin -version.semver=0.9.3 +version.semver=0.9.3-SNAPSHOT