-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Gradle Release Plugin] - pre tag commit: 'v0.5.0'.
- Loading branch information
Showing
235 changed files
with
17,948 additions
and
1,179 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
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,184 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'cobertura' | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 23 | ||
buildToolsVersion "23.0.1" | ||
|
||
useLibrary 'org.apache.http.legacy' | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
versionName version | ||
consumerProguardFiles 'proguard.txt' | ||
} | ||
|
||
sourceSets { | ||
test { | ||
java.srcDirs += '../test-shared/test/java/' | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.sourceFiles | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
classpath += configurations.compile | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
project.archivesBaseName = artifactId | ||
|
||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
: "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('ossrhUsername') ? ossrhUsername : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('ossrhPassword') ? ossrhPassword : "" | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
snapshotRepository(url: getSnapshotRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
pom.project { | ||
name 'Uber Rides Android SDK (beta)' | ||
packaging 'aar' | ||
artifactId artifactId | ||
|
||
description 'The official Android SDK (beta) for the Uber Rides API.' | ||
url 'https://developer.uber.com' | ||
|
||
scm { | ||
connection 'scm:git:git@github.com:uber/rides-android-sdk.git' | ||
developerConnection 'scm:git:git@github.com:uber/rides-android-sdk.git' | ||
url 'git@github.com:uber/rides-android-sdk.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'MIT License' | ||
url 'http://www.opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'arogal' | ||
name 'Adam Rogal' | ||
email 'arogal@uber.com' | ||
} | ||
|
||
developer { | ||
id 'itstexter' | ||
name 'Alex Texter' | ||
email 'texter@uber.com' | ||
} | ||
|
||
developer { | ||
id 'tyvsmith' | ||
name 'Ty Smith' | ||
email 'tys@uber.com' | ||
} | ||
|
||
developer { | ||
id 'yhartanto' | ||
name 'Yohan Hartanto' | ||
email 'yohan@uber.com' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
cobertura { | ||
coverageFormats = ['html', 'xml'] | ||
coverageIgnoreTrivial = true | ||
coverageExcludes += [ | ||
'.*android\\.support\\.v7\\.appcompat\\.R\\.*', | ||
'.*com\\.uber\\.sdk\\.android\\.core\\.R\\.*', | ||
'.*android\\.support\\.v7\\.appcompat\\.R\\$.*\\.*', | ||
'.*com\\.uber\\.sdk\\.android\\.core\\.R\\$.*\\.*', | ||
'.*BuildConfig.*'] | ||
} | ||
|
||
dependencies { | ||
compile ('com.uber.sdk:rides:0.5.0') { | ||
//Do not need Google OAuth based logic in Android | ||
exclude module: 'slf4j-log4j12' | ||
exclude module: 'google-oauth-client' | ||
exclude module: 'google-http-client-jackson2' | ||
} | ||
|
||
compile 'com.android.support:appcompat-v7:23.0.1' | ||
|
||
//Needed for runtime annotation preservation in Moshi | ||
//Will require Java SDK updates to remove safely | ||
compile 'com.google.code.findbugs:jsr305:1.3.9' | ||
|
||
testCompile 'junit:junit:4.12' | ||
testCompile 'com.google.guava:guava:18.0' | ||
testCompile 'com.google.http-client:google-http-client-jackson2:1.19.0' | ||
testCompile 'org.mockito:mockito-core:1.10.19' | ||
testCompile 'org.assertj:assertj-core:1.7.1' | ||
testCompile 'org.robolectric:robolectric:3.0' | ||
|
||
//Needed for Cobertura checks because of above exclude | ||
testCompile 'com.google.http-client:google-http-client-jackson2:1.19.0' | ||
testCompile 'com.google.oauth-client:google-oauth-client:1.19.0' | ||
testCompile 'org.slf4j:slf4j-log4j12:1.7.5' | ||
|
||
cobertura 'com.google.android:android:4.1.1.4' | ||
} |
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 @@ | ||
artifactId=core-android |
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,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- | ||
~ Copyright (c) 2016 Uber Technologies, Inc. | ||
~ | ||
~ Permission is hereby granted, free of charge, to any person obtaining a copy | ||
~ of this software and associated documentation files (the "Software"), to deal | ||
~ in the Software without restriction, including without limitation the rights | ||
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
~ copies of the Software, and to permit persons to whom the Software is | ||
~ furnished to do so, subject to the following conditions: | ||
~ | ||
~ The above copyright notice and this permission notice shall be included in | ||
~ all copies or substantial portions of the Software. | ||
~ | ||
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
~ THE SOFTWARE. | ||
--> | ||
|
||
<lint> | ||
<issue id="InvalidPackage"> | ||
<ignore path="*okio*.jar"/> | ||
<ignore path="*retrofit*.jar"/> | ||
</issue> | ||
</lint> |
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,16 @@ | ||
# OkHttp 3 | ||
-keepattributes Signature | ||
-keepattributes *Annotation* | ||
-keep class okhttp3.** { *; } | ||
-keep interface okhttp3.** { *; } | ||
-dontwarn okhttp3.** | ||
|
||
#retrofit2 | ||
-dontwarn retrofit2.** | ||
-keep class retrofit2.** { *; } | ||
-keepattributes Signature | ||
-keepattributes Exceptions | ||
|
||
-keepclasseswithmembers class * { | ||
@retrofit2.http.* <methods>; | ||
} |
Oops, something went wrong.