Added support for snapshot.

This commit is contained in:
Erik C. Thauvin 2021-05-02 21:24:59 -07:00
parent 884dde8102
commit ccfe179a2e
4 changed files with 12 additions and 8 deletions

View file

@ -11,7 +11,7 @@ plugins {
id("org.jetbrains.dokka") version "1.4.32" id("org.jetbrains.dokka") version "1.4.32"
id("org.jetbrains.kotlin.jvm") version "1.5.0" id("org.jetbrains.kotlin.jvm") version "1.5.0"
id("org.jetbrains.kotlin.kapt") version "1.5.0" id("org.jetbrains.kotlin.kapt") version "1.5.0"
id("org.sonarqube") version "3.1.1" id("org.sonarqube") version "3.2.0"
} }
group = "net.thauvin.erik" group = "net.thauvin.erik"
@ -28,7 +28,6 @@ var semverProcessor = "net.thauvin.erik:semver:1.2.0"
repositories { repositories {
mavenCentral() mavenCentral()
jcenter() // needed for detekt 1.16.0
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
} }
@ -50,6 +49,7 @@ java {
} }
detekt { detekt {
toolVersion = "main-SNAPSHOT"
baseline = project.rootDir.resolve("config/detekt/baseline.xml") baseline = project.rootDir.resolve("config/detekt/baseline.xml")
} }
@ -181,7 +181,11 @@ publishing {
repositories { repositories {
maven { maven {
name = "ossrh" 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) credentials(PasswordCredentials::class)
} }
} }

View file

@ -13,7 +13,7 @@ repositories {
} }
dependencies { dependencies {
implementation("net.thauvin.erik:isgd-shorten:0.9.2") implementation("net.thauvin.erik:isgd-shorten:0.9.2-SNAPSHOT")
} }
application { application {

View file

@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.thauvin.erik</groupId> <groupId>net.thauvin.erik</groupId>
<artifactId>isgd-shorten</artifactId> <artifactId>isgd-shorten</artifactId>
<version>0.9.2</version> <version>0.9.2-SNAPSHOT</version>
<name>isgd-shorten</name> <name>isgd-shorten</name>
<description>is.gd Shortener for Kotlin/Java</description> <description>is.gd Shortener for Kotlin/Java</description>
<url>https://github.com/ethauvin/isgd-shorten</url> <url>https://github.com/ethauvin/isgd-shorten</url>

View file

@ -1,8 +1,8 @@
#Generated by the Semver Plugin for Gradle #Generated by the Semver Plugin for Gradle
#Sun Mar 21 11:28:11 PDT 2021 #Sun May 02 21:57:08 PDT 2021
version.buildmeta= version.buildmeta=
version.major=0 version.major=0
version.minor=9 version.minor=9
version.patch=2 version.patch=2
version.prerelease= version.prerelease=SNAPSHOT
version.semver=0.9.2 version.semver=0.9.2-SNAPSHOT