Skip to content

Commit

Permalink
Merge pull request googleapis#13 from garrettjonesgoogle/master
Browse files Browse the repository at this point in the history
Adding javadoc and uploadArchives task, bumping to 0.0.0
  • Loading branch information
garrettjonesgoogle committed Feb 23, 2016
2 parents 4864425 + e702f03 commit 8e5cea4
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 13 deletions.
77 changes: 73 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'signing'

group = "com.google.api"
version = "0.0.0-SNAPSHOT"
archivesBaseName = "gax"
version = "0.0.0"

// Dependencies
// ------------
Expand Down Expand Up @@ -64,16 +66,25 @@ task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}

artifacts {
archives sourcesJar
// JavaDoc
// -------

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

javadoc.options {
encoding = 'UTF-8'
links 'https://docs.oracle.com/javase/8/docs/api/'
}

// Test Logging
// ------------

test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}

Expand Down Expand Up @@ -139,3 +150,61 @@ tasks.cleanEclipseJdt {
file('.factorypath')
}
}

// Publishing
// ----------

artifacts {
archives javadocJar, sourcesJar
}

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'GAX (Google Api eXtensions)'
packaging 'jar'
artifactId 'gax'
description 'Google Api eXtensions'
url 'https://github.com/googleapis'

scm {
url 'https://github.com/googleapis/gax-java'
connection 'scm:svn:https://github.com/googleapis/gax-java.git'
}

licenses {
license {
name 'BSD'
url 'https://github.com/googleapis/gax-java/blob/master/LICENSE'
}
}

developers {
developer {
id 'GoogleAPIs'
name 'GoogleAPIs'
email '[email protected]'
url 'https://github.com/googleapis'
organization 'Google, Inc.'
organizationUrl 'https://www.google.com'
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface BundlingThreshold<E> {
void accumulate(E e);

/**
* @returns whether the threshold has been reached.
* @return whether the threshold has been reached.
*/
boolean isThresholdReached();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void flush() {
* Remove all currently contained elements, regardless of whether they have triggered any
* thresholds. All elements are placed into 'bundle'.
*
* @returns the number of items added to 'bundle'.
* @return the number of items added to 'bundle'.
*/
public int drainTo(Collection<? super E> bundle) {
final Lock lock = this.lock;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/google/api/gax/core/RetryParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* {@code RetryParams} encapsulates a retry strategy used by
* {@link com.google.api.gax.grpc.ApiCallable#retrying(RetryParams)}.
* {@link com.google.api.gax.grpc.ApiCallable#retrying(RetryParams, ScheduledExecutorService)}.
*/
@AutoValue
public abstract class RetryParams {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/google/api/gax/grpc/ApiCallable.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ public void onSuccess(ResponseT result) {
}

/**
* Same as {@link #asyncCall(RequestT, StreamObserver)}, with null {@link io.grpc.Channel} and
* Same as {@link #asyncCall(CallContext, StreamObserver)}, with null {@link io.grpc.Channel} and
* default {@link io.grpc.CallOptions}.
*
* @param context {@link com.google.api.gax.grpc.CallContext} to make the call with
* @param request request
* @param observer Observer to interact with the result
*/
public void asyncCall(RequestT request, StreamObserver<ResponseT> observer) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/google/api/gax/protobuf/PathTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/**
* Represents a path template.
*
* <p>Templates use the syntax of the API platform; see the protobuf of {@link HttpRule} for
* <p>Templates use the syntax of the API platform; see the protobuf of HttpRule for
* details. A template consists of a sequence of literals, wildcards, and variable bindings,
* where each binding can have a sub-path. A string representation can be parsed into an
* instance of {@link PathTemplate}, which can then be used to perform matching and instantiation.
Expand All @@ -70,7 +70,7 @@
* <pre>
* PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
* assert template.match("v2/shelves"} == false
* Map&lt;String, String> values = template.match("v1/shelves/s1/books/b1");
* Map&lt;String, String&gt; values = template.match("v1/shelves/s1/books/b1");
* assert values.equals(ImmutableMap.of("shelf", s1", "book", "b1");
* assert template.instantiate(values).equals("v1/shelves/s1/books/b1");
* </pre>
Expand All @@ -89,7 +89,7 @@
* <pre>
* PathTemplate template = PathTemplate.create("shelves/*&#47;books/*"};
* assert template.match("shelves/books/b1") == null;
* Map&lt;String, String> values = template.match("v1/shelves/s1/books/b1");
* Map&lt;String, String&gt; values = template.match("v1/shelves/s1/books/b1");
* assert values.equals(ImmutableMap.of("$0", s1", "$1", "b1");
* </pre>
*
Expand Down Expand Up @@ -210,7 +210,7 @@ String separator() {

/**
* Creates a path template from a string. The string must satisfy the syntax
* of path templates of the API platform; see {@link HttpRule}'s proto source.
* of path templates of the API platform; see HttpRule's proto source.
*
* @throws ValidationException if there are errors while parsing the template.
*/
Expand Down

0 comments on commit 8e5cea4

Please sign in to comment.