Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions auth/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
plugins {
id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
}

description = "Stubby: Auth"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want to rename these (Stubby) in this PR?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll (hopefully very soon) have a PR that will rename everything to gRPC ... I think it would be better addressed there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

On 26 January 2015 at 14:23, Nathan Mittler notifications@github.com
wrote:

In auth/build.gradle
#39 (comment):

@@ -1,6 +1,18 @@
+// Animal sniffer plugin
+plugins {

  • id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
    +}

description = "Stubby: Auth"

We'll (hopefully very soon) have a PR that will rename everything to gRPC
... I think it would be better addressed there.

—
Reply to this email directly or view it on GitHub
https://github.com/google/grpc-java/pull/39/files#r23570015.

dependencies {
compile project(':stubby-core'),
libraries.oauth_client,
libraries.javaee_api
}

// Configure the animal sniffer plugin
animalsniffer {
signature = "org.codehaus.mojo.signature:java16:+@signature"
}
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ subprojects {
mavenLocal()
}

compileJava {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

// External dependency management
ext.libraries = [
protobuf: 'com.google.protobuf:protobuf-java:2.6.1',
Expand Down
10 changes: 10 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
plugins {
id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
}

description = 'Stubby: Core'

dependencies {
compile libraries.protobuf,
libraries.guava,
libraries.jsr305
}

// Configure the animal sniffer plugin
animalsniffer {
signature = "org.codehaus.mojo.signature:java16:+@signature"
}
34 changes: 32 additions & 2 deletions integration-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'protobuf'
apply plugin:'application'

description = "Stubby: Integration Testing"

Expand All @@ -12,6 +13,10 @@ buildscript {
}
}

configurations {
alpnboot
}

dependencies {
compile project(':stubby-core'),
project(':stubby-netty'),
Expand All @@ -20,6 +25,29 @@ dependencies {
project(':stubby-testing'),
libraries.junit,
libraries.mockito

// Determine the correct version of Jetty ALPN boot to use based
// on the Java version.
def alpnboot_prefix = 'org.mortbay.jetty.alpn:alpn-boot:'
def alpnboot_version = '8.1.2.v20141202'
if (JavaVersion.current().ordinal() < JavaVersion.VERSION_1_8.ordinal()) {
alpnboot_version = '7.1.2.v20141202'
}

alpnboot alpnboot_prefix + alpnboot_version
}

// Allow execution of test client and server.
task execute(dependsOn: classes, type:JavaExec) {
main = project.hasProperty('mainClass') ? project.mainClass : ''
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ["-Xbootclasspath/p:" + configurations.alpnboot.asPath]
workingDir = project.rootDir

// If appArgs were provided, set the program arguments.
if (project.hasProperty("appArgs")) {
args = Eval.me(appArgs)
}
}

// Allow intellij projects to refer to generated-sources
Expand All @@ -28,7 +56,9 @@ idea {
// The whole build dir is excluded by default, but we need build/generated-sources,
// which contains the generated proto classes.
excludeDirs = [file('.gradle')]
excludeDirs += files(file("$buildDir/").listFiles())
excludeDirs -= file("$buildDir/generated-sources")
if (buildDir.exists()) {
excludeDirs += files(buildDir.listFiles())
excludeDirs -= file("$buildDir/generated-sources")
}
}
}
9 changes: 9 additions & 0 deletions okhttp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
plugins {
id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
}

description = "Stubby: OkHttp"
dependencies {
compile project(':stubby-core'),
libraries.okio,
libraries.okhttp
}

// Configure the animal sniffer plugin
animalsniffer {
signature = "org.codehaus.mojo.signature:java16:+@signature"
}
12 changes: 7 additions & 5 deletions run-test-client.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash -e
TARGET='Test Service Client'
TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceClient'
TARGET_ARGS="$@"

cd "$(dirname "$0")"
mvn -q -nsu -pl integration-testing -am package -Dcheckstyle.skip=true -DskipTests
. integration-testing/target/bootclasspath.properties
TARGET_ARGS=''
for i in "$@"; do
TARGET_ARGS="$TARGET_ARGS, '$i'"
done
TARGET_ARGS="${TARGET_ARGS:2}"

echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)"
exec java "$bootclasspath" -cp "$jar" "$TARGET_CLASS" $TARGET_ARGS
gradle -PmainClass="$TARGET_CLASS" -PappArgs="[$TARGET_ARGS]" :stubby-integration-testing:execute
12 changes: 7 additions & 5 deletions run-test-server.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash -e
TARGET='Test Service Server'
TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceServer'
TARGET_ARGS="$@"

cd "$(dirname "$0")"
mvn -q -nsu -pl integration-testing -am package -Dcheckstyle.skip=true -DskipTests
. integration-testing/target/bootclasspath.properties
TARGET_ARGS=''
for i in "$@"; do
TARGET_ARGS="$TARGET_ARGS, '$i'"
done
TARGET_ARGS="${TARGET_ARGS:2}"

echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)"
exec java "$bootclasspath" -cp "$jar" "$TARGET_CLASS" $TARGET_ARGS
gradle -PmainClass="$TARGET_CLASS" -PappArgs="[$TARGET_ARGS]" :stubby-integration-testing:execute
9 changes: 9 additions & 0 deletions stub/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
plugins {
id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
}

description = "Stubby: Stub"
dependencies {
compile project(':stubby-core')
}

// Configure the animal sniffer plugin
animalsniffer {
signature = "org.codehaus.mojo.signature:java16:+@signature"
}