diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4dc7df02 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "gradle" + directory: "/examples" + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e8745c9a..5419035f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - java: ['8', '11'] + java: ['8', '11', '17'] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -33,13 +33,13 @@ jobs: run: ./gradlew publishToMavenLocal - name: Build Examples - if: matrix.java == '11' + if: matrix.java == '17' run: ./gradlew build working-directory: ./examples - id: test-data name: Run HelloWorld - if: matrix.java == '11' + if: matrix.java == '17' working-directory: ./examples run: |- ./gradlew :server:HelloWorldServer & @@ -48,7 +48,7 @@ jobs: echo "stdout=${OUTPUT//$'\n'/'%0A'}" >> $GITHUB_OUTPUT - name: Test HelloWorld - if: matrix.java == '11' + if: matrix.java == '17' uses: nick-invision/assert-action@v1 with: expected: "Received: Hello world" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7ff298..bbdbe2a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ ## Change Log +### 1.3.1 + +#### Changes + +* bump coroutines to 1.6.2 by @jamesward in https://github.com/grpc/grpc-kotlin/pull/340 +* bump versions by @jamesward in https://github.com/grpc/grpc-kotlin/pull/346 +* Support generating lite protos with Bazel by @Kernald in https://github.com/grpc/grpc-kotlin/pull/350 +* Recover cancellation when close responses flow by @akandratovich in https://github.com/grpc/grpc-kotlin/pull/344 +* Fixed Examples by Updating to Gradle 7.5.1 and Java 11 by @handstandsam in https://github.com/grpc/grpc-kotlin/pull/362 +* Provide action mnemonics for kt_jvm_proto_library implementation. by @plobsing in https://github.com/grpc/grpc-kotlin/pull/368 +* Migrate run command to work on a windows machine by @jlyon12345 in https://github.com/grpc/grpc-kotlin/pull/375 +* Enable sourceSets in the stub example project by @nkhoshini in https://github.com/grpc/grpc-kotlin/pull/376 +* bumps and build cleanup by @jamesward in https://github.com/grpc/grpc-kotlin/pull/377 +* add foojar resolver convention plugin - fixes #391 by @jamesward in https://github.com/grpc/grpc-kotlin/pull/392 +* [README][fix] Adding missing character on readme by @andrsGutirrz in https://github.com/grpc/grpc-kotlin/pull/393 +* Replace deprecated command with environment file by @jongwooo in https://github.com/grpc/grpc-kotlin/pull/395 +* fix(ServerCalls): Ensure failure cause is propagated in Status to interceptors by @zakhenry in https://github.com/grpc/grpc-kotlin/pull/400 + +## New Contributors +* @akandratovich made their first contribution in https://github.com/grpc/grpc-kotlin/pull/344 +* @handstandsam made their first contribution in https://github.com/grpc/grpc-kotlin/pull/362 +* @plobsing made their first contribution in https://github.com/grpc/grpc-kotlin/pull/368 +* @jlyon12345 made their first contribution in https://github.com/grpc/grpc-kotlin/pull/375 +* @nkhoshini made their first contribution in https://github.com/grpc/grpc-kotlin/pull/376 +* @andrsGutirrz made their first contribution in https://github.com/grpc/grpc-kotlin/pull/393 +* @jongwooo made their first contribution in https://github.com/grpc/grpc-kotlin/pull/395 +* @zakhenry made their first contribution in https://github.com/grpc/grpc-kotlin/pull/400 + +**Full Changelog**: https://github.com/grpc/grpc-kotlin/compare/v1.3.0...v1.3.1 + ### 1.3.0 #### Changes diff --git a/build.gradle.kts b/build.gradle.kts index fb0dfa8b..dc43505a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "io.grpc" -version = "1.3.0" // CURRENT_GRPC_KOTLIN_VERSION +version = "1.3.1" // CURRENT_GRPC_KOTLIN_VERSION ext["grpcVersion"] = "1.46.0" ext["protobufVersion"] = "3.20.1" diff --git a/examples/android/build.gradle.kts b/examples/android/build.gradle.kts index d244f77b..935ff2ec 100644 --- a/examples/android/build.gradle.kts +++ b/examples/android/build.gradle.kts @@ -3,12 +3,12 @@ plugins { kotlin("android") } -val composeVersion = "1.4.3" -val composeCompilerVersion = "1.4.7" +val composeVersion = "1.5.0" +val composeCompilerVersion = "1.5.0" dependencies { implementation(project(":stub-android")) - implementation("androidx.activity:activity-compose:1.7.1") + implementation("androidx.activity:activity-compose:1.7.2") implementation("androidx.compose.foundation:foundation-layout:$composeVersion") implementation("androidx.compose.material:material:$composeVersion") implementation("androidx.compose.runtime:runtime:$composeVersion") @@ -22,14 +22,14 @@ kotlin { } android { - compileSdk = 33 - buildToolsVersion = "33.0.0" + compileSdk = 34 + buildToolsVersion = "34.0.0" namespace = "io.grpc.examples.helloworld" defaultConfig { applicationId = "io.grpc.examples.hello" minSdk = 26 - targetSdk = 33 + targetSdk = 34 versionCode = 1 versionName = "1.0" diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 0355f66b..05cc2cbd 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -1,17 +1,17 @@ plugins { - id("com.android.application") version "7.4.2" apply false // Older for IntelliJ Support - id("com.google.protobuf") version "0.9.3" apply false - kotlin("jvm") version "1.8.21" apply false - id("org.jlleitschuh.gradle.ktlint") version "11.3.2" + id("com.android.application") version "8.1.1" apply false + id("com.google.protobuf") version "0.9.4" apply false + kotlin("jvm") version "1.9.0" apply false + id("org.jlleitschuh.gradle.ktlint") version "11.5.1" apply false } // todo: move to subprojects, but how? -ext["grpcVersion"] = "1.54.1" -ext["grpcKotlinVersion"] = "1.3.0" // CURRENT_GRPC_KOTLIN_VERSION -ext["protobufVersion"] = "3.22.3" -ext["coroutinesVersion"] = "1.7.0" +ext["grpcVersion"] = "1.57.2" +ext["grpcKotlinVersion"] = "1.3.1" // CURRENT_GRPC_KOTLIN_VERSION +ext["protobufVersion"] = "3.24.1" +ext["coroutinesVersion"] = "1.7.3" -allprojects { +subprojects { repositories { mavenLocal() // For testing new releases of gRPC Kotlin mavenCentral() @@ -20,10 +20,10 @@ allprojects { apply(plugin = "org.jlleitschuh.gradle.ktlint") - ktlint { + configure { filter { exclude { - it.file.path.contains("$buildDir/generated/") + it.file.path.startsWith(project.layout.buildDirectory.get().dir("generated").toString()) } } } diff --git a/examples/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/wrapper/gradle-wrapper.jar index c1962a79..7f93135c 100644 Binary files a/examples/gradle/wrapper/gradle-wrapper.jar and b/examples/gradle/wrapper/gradle-wrapper.jar differ diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..ac72c34e 100644 --- a/examples/gradle/wrapper/gradle-wrapper.properties +++ b/examples/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/gradlew b/examples/gradlew index aeb74cbb..0adc8e1a 100755 --- a/examples/gradlew +++ b/examples/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. diff --git a/examples/native-client/build.gradle.kts b/examples/native-client/build.gradle.kts index f3ef389d..cdbe54e6 100644 --- a/examples/native-client/build.gradle.kts +++ b/examples/native-client/build.gradle.kts @@ -19,10 +19,10 @@ application { // todo: add graalvm-config-create task // ./gradlew :native-client:install -// JAVA_HOME=~/.gradle/caches/com.palantir.graal/22.1.0/11/graalvm-ce-java11-22.1.0 JAVA_OPTS=-agentlib:native-image-agent=config-output-dir=native-client/src/graal native-client/build/install/native-client/bin/native-client +// JAVA_HOME=~/.gradle/caches/com.palantir.graal/22.3.3/11/graalvm-ce-java11-22.3.3 JAVA_OPTS=-agentlib:native-image-agent=config-output-dir=native-client/src/main/resources/META-INF/native-image native-client/build/install/native-client/bin/native-client graal { - graalVersion("22.3.2") + graalVersion("22.3.3") javaVersion("11") mainClass(application.mainClass.get()) outputName("hello-world") @@ -30,5 +30,4 @@ graal { option("--no-fallback") option("-H:+ReportExceptionStackTraces") option("-H:+PrintClassInitialization") - option("-H:ReflectionConfigurationFiles=src/graal/reflect-config.json") } diff --git a/examples/native-client/src/graal/reflect-config.json b/examples/native-client/src/main/resources/META-INF/native-image/reflect-config.json similarity index 92% rename from examples/native-client/src/graal/reflect-config.json rename to examples/native-client/src/main/resources/META-INF/native-image/reflect-config.json index 221e3c18..cb172a9a 100644 --- a/examples/native-client/src/graal/reflect-config.json +++ b/examples/native-client/src/main/resources/META-INF/native-image/reflect-config.json @@ -43,21 +43,17 @@ "queryAllPublicConstructors":true, "methods":[ {"name":"","parameterTypes":[] }, - {"name":"add","parameterTypes":["long"] } - ], - "queriedMethods":[{"name":"sum","parameterTypes":[] }] + {"name":"add","parameterTypes":["long"] }, + {"name":"sum","parameterTypes":[] } + ] }, { "name":"javax.naming.directory.InitialDirContext" }, -{ - "name":"kotlin.internal.jdk8.JDK8PlatformImplementations", - "methods":[{"name":"","parameterTypes":[] }] -}, { "name":"sun.misc.Unsafe", "allDeclaredFields":true, - "queriedMethods":[ + "methods":[ {"name":"arrayBaseOffset","parameterTypes":["java.lang.Class"] }, {"name":"arrayIndexScale","parameterTypes":["java.lang.Class"] }, {"name":"copyMemory","parameterTypes":["long","long","long"] }, diff --git a/examples/settings.gradle.kts b/examples/settings.gradle.kts index c388931e..76c3525b 100644 --- a/examples/settings.gradle.kts +++ b/examples/settings.gradle.kts @@ -15,5 +15,5 @@ pluginManagement { } plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" } diff --git a/examples/stub-android/build.gradle.kts b/examples/stub-android/build.gradle.kts index d72a23b7..05861256 100644 --- a/examples/stub-android/build.gradle.kts +++ b/examples/stub-android/build.gradle.kts @@ -20,8 +20,8 @@ kotlin { } android { - compileSdk = 33 - buildToolsVersion = "33.0.0" + compileSdk = 34 + buildToolsVersion = "34.0.0" namespace = "io.grpc.examples.stublite" }