Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes the dep tree for stub-lite - fixes #117 #199

Merged
merged 6 commits into from
Nov 2, 2020
Merged
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
21 changes: 9 additions & 12 deletions stub-lite/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
plugins {
id 'com.google.protobuf' version '0.8.13'
id 'org.jetbrains.dokka' version '0.10.1'
id "org.jetbrains.dokka" version "0.10.1"

// Generate IntelliJ IDEA's .idea & .iml project files
// Starting with 0.8.4 of protobuf-gradle-plugin, *.proto and the gen output files are added
// to IntelliJ as sources. It is no longer necessary to add them manually to the idea {} block
// to jump to definitions from Java and Kotlin files.
// For best results, install the Protobuf and Kotlin plugins for IntelliJ.
id 'idea'
id "idea"

// Provide convenience executables for trying out the examples.
id 'application'
id 'maven-publish'
id "java-library"
id "maven-publish"
}

description = 'gRPC Kotlin: Stub Lite'
mainClassName = ''
description = "gRPC Kotlin: Stub Lite"

repositories {
google()
Expand All @@ -29,10 +26,10 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${rootProject.ext.coroutinesVersion}"

// Grpc and Protobuf
implementation "io.grpc:grpc-protobuf-lite:${rootProject.ext.grpcVersion}"
implementation "io.grpc:grpc-stub:${rootProject.ext.grpcVersion}"
implementation ("io.grpc:grpc-kotlin-stub:$version") {
exclude group: 'io.grpc', module: 'grpc-protobuf'
api "io.grpc:grpc-protobuf-lite:${rootProject.ext.grpcVersion}"

api(project(":grpc-kotlin-stub")) {
exclude group: "io.grpc", module: "grpc-protobuf"
}

// Java
Expand Down
31 changes: 15 additions & 16 deletions stub/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
plugins {
id 'com.google.protobuf' version '0.8.13'
id 'org.jetbrains.dokka' version '0.10.1'
id "com.google.protobuf" version "0.8.13"
id "org.jetbrains.dokka" version "0.10.1"

// Generate IntelliJ IDEA's .idea & .iml project files
// Starting with 0.8.4 of protobuf-gradle-plugin, *.proto and the gen output files are added
// to IntelliJ as sources. It is no longer necessary to add them manually to the idea {} block
// to jump to definitions from Java and Kotlin files.
// For best results, install the Protobuf and Kotlin plugins for IntelliJ.
id 'idea'
id "idea"

// Provide convenience executables for trying out the examples.
id 'application'
id 'maven-publish'
id "java-library"
id "maven-publish"
}

description = 'gRPC Kotlin: Stub'
mainClassName = ''
description = "gRPC Kotlin: Stub"

repositories {
google()
Expand All @@ -29,8 +28,8 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${rootProject.ext.coroutinesVersion}"

// Grpc and Protobuf
implementation "io.grpc:grpc-protobuf:${rootProject.ext.grpcVersion}"
implementation "io.grpc:grpc-stub:${rootProject.ext.grpcVersion}"
api "io.grpc:grpc-protobuf:${rootProject.ext.grpcVersion}"
api "io.grpc:grpc-stub:${rootProject.ext.grpcVersion}"

// Java
implementation "javax.annotation:javax.annotation-api:1.2"
Expand All @@ -39,7 +38,7 @@ dependencies {
testImplementation "junit:junit:4.12"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.5.2"
testImplementation "org.jetbrains.kotlin:kotlin-reflect:1.3.61"
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.2'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.2"
testImplementation "com.google.truth.extensions:truth-proto-extension:1.0"
testImplementation "io.grpc:grpc-testing:${rootProject.ext.grpcVersion}" // gRCP testing utilities
}
Expand All @@ -58,8 +57,8 @@ protobuf {
}
generateProtoTasks {
all().each { task ->
if (task.name.startsWith('generateTestProto')) {
task.dependsOn { ':grpc-kotlin-compiler:installDist' }
if (task.name.startsWith("generateTestProto")) {
task.dependsOn { ":grpc-kotlin-compiler:installDist" }
}
task.plugins {
// Generate Java gRPC classes
Expand All @@ -72,14 +71,14 @@ protobuf {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
duplicatesStrategy 'exclude'
archiveClassifier = "javadoc"
duplicatesStrategy "exclude"
includeEmptyDirs false
from javadoc.destinationDir
}

task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputFormat = "javadoc"
outputDirectory = "$buildDir/javadoc"
}

Expand All @@ -89,7 +88,7 @@ javadocJar {
}

task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier = "sources"
from sourceSets.main.allSource
}

Expand Down
1 change: 1 addition & 0 deletions stub/src/test/java/io/grpc/kotlin/AbstractCallsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ abstract class AbstractCallsTest {
executor.shutdown()
if (this::channel.isInitialized) {
channel.shutdownNow()
channel.awaitTermination(1, TimeUnit.SECONDS)
}
}

Expand Down