Skip to content

Commit df23b9e

Browse files
committed
Replace bintray with maven central
1 parent 143569c commit df23b9e

File tree

2 files changed

+71
-37
lines changed

2 files changed

+71
-37
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# kotlin-inline-logger
22

3-
[![Release](https://api.bintray.com/packages/michaelbull/maven/kotlin-inline-logger/images/download.svg)](https://bintray.com/michaelbull/maven/kotlin-inline-logger/_latestVersion) [![CI Status](https://github.com/michaelbull/kotlin-inline-logger/workflows/ci/badge.svg)](https://github.com/michaelbull/kotlin-inline-logger/actions?query=workflow%3Aci) [![License](https://img.shields.io/github/license/michaelbull/kotlin-inline-logger.svg)](https://github.com/michaelbull/kotlin-inline-logger/blob/master/LICENSE)
3+
[![Maven Central](https://img.shields.io/maven-central/v/com.michael-bull.kotlin-inline-logger/kotlin-inline-logger.svg)](https://search.maven.org/search?q=g:com.michael-bull.kotlin-inline-logger) [![CI Status](https://github.com/michaelbull/kotlin-inline-logger/workflows/ci/badge.svg)](https://github.com/michaelbull/kotlin-inline-logger/actions?query=workflow%3Aci) [![License](https://img.shields.io/github/license/michaelbull/kotlin-inline-logger.svg)](https://github.com/michaelbull/kotlin-inline-logger/blob/master/LICENSE)
44

55
A logger facilitating lazily-evaluated log calls via Kotlin's inline [classes][inline-classes] & [functions][inline-functions].
66

77
## Installation
88

99
```groovy
1010
repositories {
11-
maven { url = 'https://dl.bintray.com/michaelbull/maven' }
11+
mavenCentral()
1212
}
1313
1414
dependencies {
15-
compile 'com.michael-bull.kotlin-inline-logger:kotlin-inline-logger-jvm:1.0.1'
15+
implementation("com.michael-bull.kotlin-inline-logger:kotlin-inline-logger:1.0.2")
1616
}
1717
```
1818

build.gradle.kts

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
2-
import com.jfrog.bintray.gradle.BintrayExtension
3-
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
2+
3+
val ossrhUsername: String? by ext
4+
val ossrhPassword: String? by ext
45

56
description = "A logger facilitating lazily-evaluated log calls via Kotlin's inline classes & functions."
67

78
plugins {
89
`maven-publish`
10+
signing
911
kotlin("multiplatform") version "1.3.61"
1012
id("com.github.ben-manes.versions") version "0.27.0"
11-
id("com.jfrog.bintray") version "1.8.4"
1213
id("net.researchgate.release") version "2.8.1"
1314
}
1415

@@ -22,7 +23,6 @@ tasks.withType<DependencyUpdatesTask> {
2223

2324
repositories {
2425
mavenCentral()
25-
jcenter()
2626
}
2727

2828
kotlin {
@@ -69,40 +69,74 @@ kotlin {
6969
}
7070
}
7171

72-
fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit) {
73-
pkg(delegateClosureOf(configure))
72+
signing {
73+
useGpgCmd()
74+
sign(publishing.publications)
7475
}
7576

76-
val bintrayUser: String? by project
77-
val bintrayKey: String? by project
78-
79-
bintray {
80-
user = bintrayUser
81-
key = bintrayKey
82-
setPublications("jvm", "metadata")
83-
84-
pkg {
85-
repo = "maven"
86-
name = project.name
87-
desc = project.description
88-
websiteUrl = "https://github.com/michaelbull/kotlin-inline-logger"
89-
issueTrackerUrl = "https://github.com/michaelbull/kotlin-inline-logger/issues"
90-
vcsUrl = "[email protected]:michaelbull/kotlin-inline-logger.git"
91-
githubRepo = "michaelbull/kotlin-inline-logger"
92-
setLicenses("ISC")
77+
publishing {
78+
repositories {
79+
maven {
80+
if (project.version.toString().endsWith("SNAPSHOT")) {
81+
setUrl("https://oss.sonatype.org/content/repositories/snapshots")
82+
} else {
83+
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2")
84+
}
85+
86+
credentials {
87+
username = ossrhUsername
88+
password = ossrhPassword
89+
}
90+
}
9391
}
94-
}
9592

96-
val bintrayUpload by tasks.existing(BintrayUploadTask::class) {
97-
dependsOn("build")
98-
dependsOn("generatePomFileForJvmPublication")
99-
dependsOn("generatePomFileForMetadataPublication")
100-
dependsOn("jvmJar")
101-
dependsOn("jvmSourcesJar")
102-
dependsOn("metadataJar")
103-
dependsOn("metadataSourcesJar")
93+
publications.withType<MavenPublication> {
94+
pom {
95+
name.set(project.name)
96+
description.set(project.description)
97+
url.set("https://github.com/michaelbull/kotlin-inline-logger")
98+
inceptionYear.set("2019")
99+
100+
licenses {
101+
license {
102+
name.set("ISC License")
103+
url.set("https://opensource.org/licenses/isc-license.txt")
104+
}
105+
}
106+
107+
developers {
108+
developer {
109+
name.set("Michael Bull")
110+
url.set("https://www.michael-bull.com")
111+
}
112+
}
113+
114+
scm {
115+
connection.set("scm:git:https://github.com/michaelbull/kotlin-inline-logger")
116+
developerConnection.set("scm:git:[email protected]:michaelbull/kotlin-inline-logger.git")
117+
url.set("https://github.com/michaelbull/kotlin-inline-logger")
118+
}
119+
120+
issueManagement {
121+
system.set("GitHub")
122+
url.set("https://github.com/michaelbull/kotlin-inline-logger/issues")
123+
}
124+
125+
ciManagement {
126+
system.set("GitHub")
127+
url.set("https://github.com/michaelbull/kotlin-inline-logger/actions?query=workflow%3Aci")
128+
}
129+
130+
contributors {
131+
contributor {
132+
name.set("Toby-S")
133+
url.set("https://github.com/Toby-S")
134+
}
135+
}
136+
}
137+
}
104138
}
105139

106-
tasks.named("afterReleaseBuild") {
107-
dependsOn(bintrayUpload)
140+
tasks.afterReleaseBuild {
141+
dependsOn(tasks.publish)
108142
}

0 commit comments

Comments
 (0)