-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add maven-publish.gradle, upload aar to maven central.
- Loading branch information
Showing
6 changed files
with
95 additions
and
121 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
// Android libraries | ||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
// https://github.com/novoda/bintray-release/issues/71 | ||
excludes = ['**/*.kt'] // < ---- Exclude all kotlin files from javadoc file. | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
options.encoding = "UTF-8" | ||
options.charSet = "UTF-8" | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.withType(Javadoc) { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
// Add javadoc/source jar tasks as artifacts | ||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
// Signing artifacts | ||
signing { | ||
required { gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.groupId = publishedGroupId | ||
pom.artifactId = artifact | ||
pom.version = libraryVersion | ||
|
||
pom.project { | ||
packaging 'aar' | ||
|
||
name libraryName | ||
description libraryDescription | ||
url siteUrl | ||
|
||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
} | ||
|
||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,18 +1,14 @@ | ||
ext { | ||
bintrayRepo = 'maven' | ||
bintrayName = 'and-linker' | ||
|
||
publishedGroupId = 'com.codezjx.library' | ||
libraryName = 'AndLinker' | ||
artifact = 'andlinker' | ||
|
||
libraryVersion = '0.8.0' | ||
|
||
libraryName = 'AndLinker' | ||
libraryDescription = 'AndLinker is a IPC library for Android, which combines the features of AIDL and Retrofit. Allows IPC call seamlessly compose with rxjava and rxjava2 call adapters.' | ||
|
||
siteUrl = 'https://github.com/codezjx/AndLinker' | ||
gitUrl = 'https://github.com/codezjx/AndLinker.git' | ||
|
||
libraryVersion = '0.7.2' | ||
|
||
developerId = 'codezjx' | ||
developerName = 'codezjx' | ||
developerEmail = '[email protected]' | ||
|
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