Skip to content

Commit

Permalink
Merge pull request #607 from micronaut-projects/4.0.x
Browse files Browse the repository at this point in the history
build: Use Micronaut Framework 4.0.0-SNAPSHOT
  • Loading branch information
timyates authored Dec 20, 2022
2 parents 1984730 + a33ef77 commit 5f072b0
Show file tree
Hide file tree
Showing 109 changed files with 1,486 additions and 600 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/central-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: Publish to Sonatype OSSRH
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11', '17']
java: ['17']
graalvm: ['latest', 'dev']
steps:
# https://github.com/actions/virtual-environments/issues/709
Expand All @@ -42,6 +42,7 @@ jobs:
version: ${{ matrix.graalvm }}
java-version: ${{ matrix.java }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Gradle
run: |
if ./gradlew tasks --no-daemon --all | grep -w "testNativeImage"
Expand All @@ -58,7 +59,7 @@ jobs:
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v3.5.2
uses: mikepenz/action-junit-report@v3.6.2
with:
check_name: GraalVM CE CI / Test Report (Java ${{ matrix.java }})
report_paths: '**/build/test-results/test/TEST-*.xml'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11', '17']
java: ['17']
steps:
# https://github.com/actions/virtual-environments/issues/709
- name: Free disk space
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v3.5.2
uses: mikepenz/action-junit-report@v3.6.2
with:
check_name: Java CI / Test Report (${{ matrix.java }})
report_paths: '**/build/test-results/test/TEST-*.xml'
Expand All @@ -72,7 +72,7 @@ jobs:
name: binary-compatibility-reports
path: "**/build/reports/binary-compatibility-*.html"
- name: Publish to Sonatype Snapshots
if: success() && github.event_name == 'push' && matrix.java == '11'
if: success() && github.event_name == 'push' && matrix.java == '17'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand All @@ -88,7 +88,7 @@ jobs:
if_true: "micronaut-projects/micronaut-docs"
if_false: ${{ github.repository }}
- name: Publish to Github Pages
if: success() && github.event_name == 'push' && matrix.java == '11'
if: success() && github.event_name == 'push' && matrix.java == '17'
uses: micronaut-projects/github-pages-deploy-action@master
env:
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: Publish to Sonatype Snapshots
if: success()
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: Set the current release version
id: release_version
run: echo ::set-output name=release_version::${GITHUB_REF:11}
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
actions: read # To read the workflow path.
id-token: write # To sign the provenance.
contents: write # To add assets to a release.
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.2.1
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0
with:
base64-subjects: "${{ needs.release.outputs.hashes }}"
upload-assets: true # Upload to a new release.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Optional setup step
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NOTE: If you are unsure about something and the issue is more of a question a be

- [ ] Steps to reproduce provided
- [ ] Stacktrace (if present) provided
- [ ] Example that reproduces the problem uploaded to Github
- [ ] Example that reproduces the problem uploaded to GitHub
- [ ] Full description of the issue provided (see below)

### Steps to Reproduce
Expand All @@ -32,5 +32,5 @@ Tell us what happens instead

### Example Application

- TODO: link to github repository with example that reproduces the issue
- TODO: link to GitHub repository with example that reproduces the issue

4 changes: 2 additions & 2 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ All Micronaut repos have 2 dependency upgrade checking mechanism:
arrives for both, it will send 2 PRs, where they should both be upgraded at the same time.

2. To overcome those disadvantages, we have our own dependency upgrade solution based on the
[Gradle Use Latest Versions Plugin](https://github.com/patrikerdes/gradle-use-latest-versions-plugin). It runs daily
[Gradle Use The Latest Versions Plugin](https://github.com/patrikerdes/gradle-use-latest-versions-plugin). It runs daily
during weekdays.

The consequence of having both approaches in place is that we get multiple dependency upgrade PRs: one created by
Expand All @@ -109,7 +109,7 @@ unnecessary upgrade burden on our users. Read the
[Module Upgrade Strategy](https://github.com/micronaut-projects/micronaut-core/wiki/Module-Upgrade-Strategy) for more
information.

Note that if a new version arrives and we are not ready yet to do the upgrade, you need to
Note that if a new version arrives, and we are not ready yet to do the upgrade, you need to
[pin the old version](https://github.com/micronaut-projects/micronaut-build/#configuration-options), because otherwise,
Renovate and our workflow will keep sending PRs. You should also create an issue to upgrade so that it's not forgotten.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We release patches for security vulnerabilities. Which versions are eligible
receiving such patches depend on the CVSS v3.0 Rating:

| CVSS v3.0 | Supported Versions |
| --------- | ----------------------------------------- |
|-----------|-------------------------------------------|
| 9.0-10.0 | Releases within the previous three months |
| 4.0-8.9 | Most recent release |

Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id "io.micronaut.build.internal.docs"
id "io.micronaut.build.internal.dependency-updates"
id "io.micronaut.build.internal.quality-reporting"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id "io.micronaut.build.internal.grpc-base"
}
6 changes: 4 additions & 2 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@
<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="JavadocMethod">
<property name="excludeScope" value="private"/>
<property name="accessModifiers" value="public, protected"/>
</module>
<module name="JavadocType"/>
<module name="JavadocStyle"/>
<module name="MissingJavadocType"/>
<module name="MissingJavadocType">
<property name="severity" value="warning"/>
</module>

<!-- Checks for Naming Conventions. -->
<!-- See https://checkstyle.org/config_naming.html -->
Expand Down
11 changes: 3 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
projectVersion=3.4.0-SNAPSHOT
projectVersion=4.0.0-SNAPSHOT
projectGroup=io.micronaut.grpc
micronautDocsVersion=2.0.0
micronautVersion=3.7.3
micronautTestVersion=3.7.0
groovyVersion=3.0.13
spockVersion=2.3-groovy-3.0

title=Micronaut gRPC
projectDesc=Integration between Micronaut and gRPC
projectUrl=http://micronaut.io
projectUrl=https://micronaut.io
githubSlug=micronaut-projects/micronaut-grpc
developers=Graeme Rocher

githubCoreBranch=3.8.x
githubCoreBranch=4.0.x
bomProperty=micronautGrpcVersion

org.gradle.caching=true
Expand Down
22 changes: 22 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ jackson-datatype-protobuf = '0.9.13'
jaeger-core = '1.8.1'
opentracing-grpc = '0.2.3'
opentracing-mock = '0.33.0'

micronaut = "4.0.0-SNAPSHOT"
micronaut-docs = '2.0.0'
micronaut-test = "4.0.0-SNAPSHOT"

graal-svm = "22.0.0.2"
groovy = "4.0.6"
javax-annotation-api = "1.3.2"
spock = "2.3-groovy-4.0"

micronaut-discovery = "4.0.0-SNAPSHOT"
micronaut-reactor = "3.0.0-SNAPSHOT"
micronaut-tracing = "4.4.0"
micronaut-tracing-legacy = "3.2.7"

[libraries]

Expand All @@ -20,9 +33,15 @@ managed-protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.
managed-protobuf-java-util = { module = 'com.google.protobuf:protobuf-java-util', version.ref = 'managed-protobuf' }
managed-protoc = { module = 'com.google.protobuf:protoc', version.ref = 'managed-protobuf' }

micronaut-discovery-client = { module = "io.micronaut.discovery:micronaut-discovery-client", version.ref = "micronaut-discovery" }
micronaut-docs-asciidoc-config-props = { module = 'io.micronaut.docs:micronaut-docs-asciidoc-config-props', version.ref = 'micronaut-docs' }
micronaut-tracing-legacy = { module = "io.micronaut:micronaut-tracing", version.ref = "micronaut-tracing-legacy" }

graal-svm = { module = "org.graalvm.nativeimage:svm", version.ref = "graal-svm" }
grpc-netty = { module = 'io.grpc:grpc-netty' }

jackson-datatype-protobuf = { module = 'com.hubspot.jackson:jackson-datatype-protobuf', version.ref = 'jackson-datatype-protobuf' }
javax-annotation-api = { module = "javax.annotation:javax.annotation-api", version.ref = "javax-annotation-api" }

jaeger-core = { module = 'io.jaegertracing:jaeger-core', version.ref = 'jaeger-core' }

Expand All @@ -33,6 +52,9 @@ opentracing-grpc = { module = 'io.opentracing.contrib:opentracing-grpc', version
opentracing-mock = { module = 'io.opentracing:opentracing-mock', version.ref = 'opentracing-mock' }

## BOMs
micronaut-reactor = { module = 'io.micronaut.reactor:micronaut-reactor-bom', version.ref = "micronaut-reactor" }
micronaut-tracing = { module = "io.micronaut.tracing:micronaut-tracing-bom", version.ref = "micronaut-tracing" }

boms-protobuf = { module = 'com.google.protobuf:protobuf-bom', version.ref = 'managed-protobuf' }
boms-grpc = { module = 'io.grpc:grpc-bom', version.ref = 'managed-grpc' }

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package io.micronaut.grpc.annotation;

import io.micronaut.context.annotation.AliasFor;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;

import io.micronaut.context.annotation.AliasFor;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
Expand All @@ -31,6 +31,7 @@
@Documented
@Retention(RUNTIME)
public @interface GrpcChannel {

/**
* @return The URL or service ID of the remote service
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
*/
package io.micronaut.grpc.annotation;

import jakarta.inject.Singleton;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.inject.Singleton;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[ {
"name" : "io.micronaut.grpc.annotation.GrpcChannel",
"allDeclaredConstructors" : true
} ]
[
{
"name": "io.micronaut.grpc.annotation.GrpcChannel",
"allDeclaredConstructors": true
}
]
12 changes: 9 additions & 3 deletions grpc-client-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ dependencies {
api platform(libs.boms.grpc)
api projects.grpcAnnotation
api projects.grpcOpentracing
api mn.micronaut.runtime
api libs.managed.grpc.protobuf
api libs.managed.grpc.stub

compileOnly libs.micronaut.discovery.client

implementation libs.grpc.netty
implementation mn.reactor
implementation mn.micronaut.buffer.netty
compileOnly mn.micronaut.discovery

testCompileOnly libs.javax.annotation.api

testImplementation projects.grpcServerRuntime
testImplementation mn.micronaut.discovery
testImplementation libs.micronaut.discovery.client
testImplementation mn.micronaut.jackson.databind
testImplementation libs.opentracing.mock

testRuntimeOnly mn.micronaut.jackson.databind
}

// compileJava.options.fork=true
Expand Down Expand Up @@ -49,3 +54,4 @@ micronautBuild {
acceptedRegressionsFile = file("config/accepted-api-changes.json")
}
}

Loading

0 comments on commit 5f072b0

Please sign in to comment.