diff --git a/README.md b/README.md index 23f7bcf..8e52598 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This library is available on [Maven Central](https://search.maven.org/artifact/r #### Gradle ``` -implementation 'ru.cleverpumpkin:crunchycalendar:2.0.0' +implementation 'ru.cleverpumpkin:crunchycalendar:2.2.0' ``` #### Maven @@ -33,7 +33,7 @@ implementation 'ru.cleverpumpkin:crunchycalendar:2.0.0' ru.cleverpumpkin crunchycalendar - 2.0.0 + 2.2.0 pom ``` diff --git a/mavenCentral/mavenCentral.gradle b/mavenCentral/mavenCentral.gradle index b4bde05..e8c8953 100644 --- a/mavenCentral/mavenCentral.gradle +++ b/mavenCentral/mavenCentral.gradle @@ -1,77 +1,67 @@ -apply plugin: 'maven' +apply plugin: 'maven-publish' apply plugin: 'signing' group = groupId version = libraryVersion -task sourceJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - archiveClassifier.set("source") +signing { + sign publishing.publications } -task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - destinationDir = file("../javadoc/") - failOnError false -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set("javadoc") - from tasks.javadoc.destinationDir -} - -//Creating sources with comments -task androidSourcesJar(type: Jar) { - archiveClassifier.set("sources") - from android.sourceSets.main.java.srcDirs -} +afterEvaluate { + publishing { + repositories { + maven { + name = "mavenCentral" + url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username(sonatypeUsername) + password(sonatypePassword) + } + } + } + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release -artifacts { - archives javadocJar - archives androidSourcesJar -} + // You can then customize attributes of the publication as shown below. + groupId = groupId + artifactId = artifactId + version = libraryVersion -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } - pom.project { - name libraryName - packaging 'aar' - description libraryDescription - artifactId artifactId - url siteUrl - scm { - url gitUrl - connection gitUrl - developerConnection gitUrl - } - licenses { - license { - name licenseName - url licenseUrl - distribution 'repo' - } - } - developers { - developer { - id 'alexsurinov' - name 'Alexander Surinov' - organization 'clverpumpkin' + pom { + name = libraryName + description = libraryDescription + url = siteUrl + licenses { + license { + name = licenseName + url = licenseUrl + } } - developer { - id 'Limanskaya' - name 'Anastasiya Stroganova' - organization 'clverpumpkin' + developers { + developer { + id = 'alexsurinov' + name = 'Alexander Surinov' + organization = 'clverpumpkin' + } + developer { + id = 'Limanskaya' + name = 'Anastasiya Stroganova' + organization = 'clverpumpkin' + } + developer { + id = 'itolianezzz' + name = 'Anatoly Shulipov' + organization = 'clverpumpkin' + } } - developer { - id 'itolianezzz' - name 'Anatoly Shulipov' - organization 'clverpumpkin' + scm { + connection = gitUrl + developerConnection = gitUrl + url = siteUrl } } }