-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure plugin for uploading library to mavenCentral. Remove bintra…
…y upload plugin
- Loading branch information
Anatoliy Shulipov
committed
Apr 14, 2021
1 parent
a34e658
commit a52b275
Showing
5 changed files
with
94 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
group = groupId | ||
version = libraryVersion | ||
|
||
task sourceJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
archiveClassifier.set("source") | ||
} | ||
|
||
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 | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
archives androidSourcesJar | ||
} | ||
|
||
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' | ||
} | ||
developer { | ||
id 'Limanskaya' | ||
name 'Anastasiya Stroganova' | ||
organization 'clverpumpkin' | ||
} | ||
developer { | ||
id 'itolianezzz' | ||
name 'Anatoly Shulipov' | ||
organization 'clverpumpkin' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |