Moved to Maven Central instead of JCenter.
This commit is contained in:
parent
67665ca859
commit
d33cd60fe0
10 changed files with 88 additions and 135 deletions
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2020, Erik C. Thauvin (erik@thauvin.net)
|
||||
Copyright (c) 2020-2021, Erik C. Thauvin (erik@thauvin.net)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/readingtime/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/readingtime) [](https://bintray.com/ethauvin/maven/readingtime/_latestVersion)
|
||||
](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/readingtime/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/readingtime)
|
||||
|
||||
[](https://snyk.io/test/github/ethauvin/readingtime?targetFile=pom.xml) [](https://sonarcloud.io/dashboard?id=ethauvin_readingtime) [](https://travis-ci.com/ethauvin/readingtime) [](https://circleci.com/gh/ethauvin/readingtime/tree/master)
|
||||
|
||||
|
|
159
build.gradle.kts
159
build.gradle.kts
|
@ -1,19 +1,18 @@
|
|||
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.FileInputStream
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.33.0"
|
||||
id("com.jfrog.bintray") version "1.8.5"
|
||||
id("io.gitlab.arturbosch.detekt") version "1.14.1"
|
||||
id("org.jetbrains.dokka") version "1.4.10"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.4.10"
|
||||
id("org.sonarqube") version "3.0"
|
||||
id("com.github.ben-manes.versions") version "0.38.0"
|
||||
id("io.gitlab.arturbosch.detekt") version "1.16.0"
|
||||
id("org.jetbrains.dokka") version "1.4.30"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.4.30"
|
||||
id("org.sonarqube") version "3.1.1"
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
jacoco
|
||||
signing
|
||||
}
|
||||
|
||||
description = "Estimated Reading Time for Blog Posts, Articles, etc."
|
||||
|
@ -26,20 +25,8 @@ val mavenUrl = "https://github.com/$gitHub"
|
|||
val publicationName = "mavenJava"
|
||||
var isRelease = "release" in gradle.startParameter.taskNames
|
||||
|
||||
// Load local.properties
|
||||
File("local.properties").apply {
|
||||
if (exists()) {
|
||||
FileInputStream(this).use { fis ->
|
||||
Properties().apply {
|
||||
load(fis)
|
||||
forEach { (k, v) ->
|
||||
extra[k as String] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
|
@ -53,16 +40,13 @@ dependencies {
|
|||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
detekt {
|
||||
baseline = project.rootDir.resolve("config/detekt/baseline.xml")
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.6"
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property("sonar.projectKey", "ethauvin_$name")
|
||||
|
@ -70,18 +54,10 @@ sonarqube {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
val sourcesJar by tasks.creating(Jar::class) {
|
||||
archiveClassifier.set("sources")
|
||||
from(sourceSets.getByName("main").allSource)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.creating(Jar::class) {
|
||||
dependsOn(tasks.dokkaJavadoc)
|
||||
from(tasks.dokkaJavadoc)
|
||||
archiveClassifier.set("javadoc")
|
||||
description = "Assembles a JAR of the generated Javadoc."
|
||||
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@ -101,7 +77,7 @@ tasks {
|
|||
}
|
||||
|
||||
assemble {
|
||||
dependsOn(sourcesJar, javadocJar)
|
||||
dependsOn(javadocJar)
|
||||
}
|
||||
|
||||
clean {
|
||||
|
@ -142,16 +118,6 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
val bintrayUpload by existing(BintrayUploadTask::class) {
|
||||
dependsOn(publishToMavenLocal, gitTag)
|
||||
doFirst {
|
||||
versionName = "${project.version}"
|
||||
versionDesc = "${project.name} ${project.version}"
|
||||
versionVcsTag = "${project.version}"
|
||||
versionReleased = Date().toString()
|
||||
}
|
||||
}
|
||||
|
||||
register("deploy") {
|
||||
description = "Copies all needed files to the $deployDir directory."
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
|
@ -162,9 +128,9 @@ tasks {
|
|||
}
|
||||
|
||||
register("release") {
|
||||
description = "Publishes version ${project.version} to Bintray."
|
||||
description = "Publishes version ${project.version} to Maven Central."
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
dependsOn("wrapper", bintrayUpload)
|
||||
dependsOn("wrapper", "deploy", "gitTag", "publishToMavenLocal")
|
||||
}
|
||||
|
||||
"sonarqube" {
|
||||
|
@ -172,82 +138,51 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
fun findProperty(s: String) = project.findProperty(s) as String?
|
||||
bintray {
|
||||
user = findProperty("bintray.user")
|
||||
key = findProperty("bintray.apikey")
|
||||
publish = isRelease
|
||||
setPublications(publicationName)
|
||||
pkg.apply {
|
||||
repo = "maven"
|
||||
name = project.name
|
||||
desc = description
|
||||
websiteUrl = mavenUrl
|
||||
issueTrackerUrl = "$mavenUrl/issues"
|
||||
githubRepo = gitHub
|
||||
githubReleaseNotesFile = "README.md"
|
||||
vcsUrl = "$mavenUrl.git"
|
||||
setLabels(
|
||||
"articles",
|
||||
"blog",
|
||||
"java",
|
||||
"kotlin",
|
||||
"medium",
|
||||
"min",
|
||||
"posts",
|
||||
"read",
|
||||
"readingtime",
|
||||
"readtime",
|
||||
"weblog"
|
||||
)
|
||||
setLicenses("BSD 3-Clause")
|
||||
publicDownloadNumbers = true
|
||||
version.apply {
|
||||
name = project.version as String
|
||||
desc = description
|
||||
vcsTag = project.version as String
|
||||
gpg.apply {
|
||||
sign = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>(publicationName) {
|
||||
from(components["java"])
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
pom.withXml {
|
||||
asNode().apply {
|
||||
appendNode("name", project.name)
|
||||
appendNode("description", project.description)
|
||||
appendNode("url", mavenUrl)
|
||||
|
||||
appendNode("licenses").appendNode("license").apply {
|
||||
appendNode("name", "BSD 3-Clause")
|
||||
appendNode("url", "https://opensource.org/licenses/BSD-3-Clause")
|
||||
pom {
|
||||
name.set(project.name)
|
||||
description.set(project.description)
|
||||
url.set(mavenUrl)
|
||||
licenses {
|
||||
license {
|
||||
name.set("BSD 3-Clause")
|
||||
url.set("https://opensource.org/licenses/BSD-3-Clause")
|
||||
}
|
||||
|
||||
appendNode("developers").appendNode("developer").apply {
|
||||
appendNode("id", "ethauvin")
|
||||
appendNode("name", "Erik C. Thauvin")
|
||||
appendNode("email", "erik@thauvin.net")
|
||||
}
|
||||
|
||||
appendNode("scm").apply {
|
||||
appendNode("connection", "scm:git:$mavenUrl.git")
|
||||
appendNode("developerConnection", "scm:git:git@github.com:$gitHub.git")
|
||||
appendNode("url", mavenUrl)
|
||||
}
|
||||
|
||||
appendNode("issueManagement").apply {
|
||||
appendNode("system", "GitHub")
|
||||
appendNode("url", "$mavenUrl/issues")
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id.set("ethauvin")
|
||||
name.set("Erik C. Thauvin")
|
||||
email.set("erik@thauvin.net")
|
||||
url.set("https://erik.thauvin.net/")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection.set("scm:git:git://github.com/$gitHub.git")
|
||||
developerConnection.set("scm:git:git@github.com:$gitHub.git")
|
||||
url.set("$mavenUrl")
|
||||
}
|
||||
issueManagement {
|
||||
system.set("GitHub")
|
||||
url.set("$mavenUrl/issues")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
name = "ossrh"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign(publishing.publications[publicationName])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("org.jetbrains.kotlin.jvm") version "1.4.10"
|
||||
id("com.github.ben-manes.versions") version "0.33.0"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.4.31"
|
||||
id("com.github.ben-manes.versions") version "0.38.0"
|
||||
application
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ plugins {
|
|||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
0
examples/gradlew
vendored
Normal file → Executable file
0
examples/gradlew
vendored
Normal file → Executable file
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
31
pom.xml
31
pom.xml
|
@ -9,20 +9,6 @@
|
|||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>readingtime</artifactId>
|
||||
<version>0.9.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.13.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<name>readingtime</name>
|
||||
<description>Estimated Reading Time for Blog Posts, Articles, etc.</description>
|
||||
<url>https://github.com/ethauvin/readingtime</url>
|
||||
|
@ -37,10 +23,11 @@
|
|||
<id>ethauvin</id>
|
||||
<name>Erik C. Thauvin</name>
|
||||
<email>erik@thauvin.net</email>
|
||||
<url>https://erik.thauvin.net/</url>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/ethauvin/readingtime.git</connection>
|
||||
<connection>scm:git:git://github.com/ethauvin/readingtime.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:ethauvin/readingtime.git</developerConnection>
|
||||
<url>https://github.com/ethauvin/readingtime</url>
|
||||
</scm>
|
||||
|
@ -48,4 +35,18 @@
|
|||
<system>GitHub</system>
|
||||
<url>https://github.com/ethauvin/readingtime/issues</url>
|
||||
</issueManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.4.30</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.13.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
17
pom.xml.asc
Normal file
17
pom.xml.asc
Normal file
|
@ -0,0 +1,17 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: BCPG v1.64
|
||||
|
||||
iQIzBAABCgAdFiEEOckYpvaxKUI3I6Pxd2cCpqLaMw4FAmBVpxIACgkQd2cCpqLa
|
||||
Mw6etw/9EaKvA1BsIxL6sbGGeI+HWLMzWjh5sPxBSGFQmkvGSa9zRmf0RNK4cjSC
|
||||
IZNrNSPGmXsNJEeSElxzUAnJwCHq64sU0XkcBJbCNg7jn7hfckGPmoMgic+5Pm/H
|
||||
/s6nQTu2t9RRAmVUdOCcrSwv/H6lnmao2qEOO67tOnm+Xd+WALbEOognz+/BCD90
|
||||
E2A90av//qckKbywq61tASDwmC61Kwo2IzyoDA11Q5YpWUQ8D0RjIuUyri8uAHX2
|
||||
nzr/aoK0ONfAibetK2RUXSzsOco2FGMOBF7sxQ+JHf/f1DOcIoH4uK9Or2Ee/FqN
|
||||
hTEnNkuhz7nT7RZPUgd+50HDAE9MNRtLiUlkrfrwthL37A8sNWRysU4CMfqUfCR1
|
||||
DAcva12GIv3sSMrA+gQH1/f8FEsrA4csN0FU3NIVuO/fIyW3p9KF8ZHnr9maG/P4
|
||||
QqkmOVoBOT7Z+kaboYBp8xZE0/JSv2/2SwFwecIGAk9wvb0K5r2+U2N4iV8y/lpt
|
||||
NRdVAT6Ch88U44dtMANCHaFoXtaV1/0jxlpMyO7XKhFVO6+5CvISGo5f7wZ943CJ
|
||||
d47dNsSzlSSfUNAuscYUB9xkqca5S+hk9uG2gncNOIU6vGJl++MF6X51HSFgnHff
|
||||
cY2eKR4IQXbL1uTo6fiqhkFZt7hE56wTB4pMK9aD6hG9FdpxYnE=
|
||||
=Jspl
|
||||
-----END PGP SIGNATURE-----
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* ReadingTime.kt
|
||||
*
|
||||
* Copyright (c) 2020, Erik C. Thauvin (erik@thauvin.net)
|
||||
* Copyright (c) 2020-2021, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue