-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
75 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.idea | ||
*.iml | ||
.gradle | ||
gradle.properties | ||
local.properties | ||
.DS_Store | ||
build | ||
/captures |
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,4 +1,6 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
|
@@ -27,3 +29,75 @@ dependencies { | |
testCompile 'org.robolectric:robolectric:3.1.2' | ||
testCompile 'org.mockito:mockito-core:1.10.19' | ||
} | ||
|
||
/* maven deploy + signing */ | ||
task javadocs(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
task javadocsJar(type: Jar, dependsOn: javadocs) { | ||
classifier = 'javadoc' | ||
from javadocs.destinationDir | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
artifacts { | ||
archives javadocsJar | ||
archives sourcesJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
def sonatypeUsername = System.properties.containsKey('sonatypeUsername') ? System.properties['sonatypeUsername'] : '' | ||
def sonatypePassword = System.properties.containsKey('sonatypePassword') ? System.properties['sonatypePassword'] : '' | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
|
||
pom.setArtifactId 'device-automator' | ||
|
||
pom.project { | ||
name 'device-automator' | ||
groupId 'com.lukekorth' | ||
version android.defaultConfig.versionName | ||
packaging 'jar' | ||
description 'An easy to use, Espresso like, syntax on top of the Android UI Automator testing framework' | ||
url 'https://github.com/lkorth/device-automator' | ||
|
||
scm { | ||
url 'scm:[email protected]:lkorth/device-automator.git' | ||
connection 'scm:[email protected]:lkorth/device-automator.git' | ||
developerConnection 'scm:[email protected]:lkorth/device-automator.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The MIT License (MIT)' | ||
url 'http://opensource.org/licenses/MIT' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'lkorth' | ||
name 'Luke Korth' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |