-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish connect api as a separate artifact (#183)
* Publish connect api as a separate artifact * Add maven dependency for connect api
- Loading branch information
1 parent
17c1431
commit 68674f1
Showing
4 changed files
with
126 additions
and
6 deletions.
There are no files selected for viewing
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,122 @@ | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
ext { | ||
bintrayRepo = 'Maven' | ||
bintrayName = 'ConnectSDK-Android' | ||
|
||
publishedGroupId = 'com.ifttt' | ||
libraryName = 'connect-api' | ||
artifact = 'connect-api' | ||
|
||
libraryDescription = | ||
'Connect Api is a library that helps facilitate network calls and data for the Connect Button SDK. It is not meant to be used as a stand-alone library' | ||
|
||
siteUrl = 'https://github.com/IFTTT/ConnectSDK-Android' | ||
gitUrl = 'https://github.com/IFTTT/ConnectSDK-Android.git' | ||
|
||
libraryVersion = "$libVersion" | ||
|
||
developerId = 'lzanita09' | ||
developerName = 'Zhe Lu' | ||
developerEmail = '[email protected]' | ||
|
||
licenseName = 'MIT' | ||
licenseUrl = 'https://github.com/IFTTT/ConnectSDK-Android/blob/master/LICENSE' | ||
allLicenses = ['MIT'] | ||
} | ||
|
||
group = publishedGroupId | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
// This generates POM.xml with proper parameters | ||
pom { | ||
project { | ||
packaging 'aar' | ||
groupId publishedGroupId | ||
artifactId artifact | ||
|
||
name libraryName | ||
description libraryDescription | ||
url siteUrl | ||
|
||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
version = libraryVersion | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set("sources") | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
afterEvaluate { | ||
javadoc.classpath += | ||
files(android.libraryVariants.collect { variant -> variant.javaCompileProvider.get().classpath.files | ||
}) | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier.set("javadoc") | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey') && | ||
project.hasProperty('bintrayGpgPassphrase')) { | ||
bintray.user = project.bintrayUser | ||
bintray.key = project.bintrayKey | ||
bintray.pkg.version.gpg.passphrase = project.bintrayGpgPassphrase | ||
} | ||
|
||
bintray { | ||
configurations = ['archives'] | ||
pkg { | ||
repo = bintrayRepo | ||
name = bintrayName | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
publish = false | ||
version { | ||
name = libraryVersion | ||
desc = libraryDescription | ||
released = new Date() | ||
vcsTag = libraryVersion | ||
gpg { | ||
sign = true | ||
} | ||
} | ||
} | ||
} |
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