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

Support for Java 21 & Gradle 8.5 #51

Merged
merged 9 commits into from
Jan 12, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
version: [8, 17, 21]
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- name: set up JDK ${{ matrix.version }}
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-version: ${{ matrix.version }}
distribution: 'zulu'
cache: gradle

- name: Grant execute permission for gradlew
Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ dependencies {
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ public void setStopTimeout(long stopTimeout) {
this.stopTimeout = stopTimeout;
}

}
}
19 changes: 18 additions & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repositories {
def jexpressVersion = '1.39-SNAPSHOT'
def grpcVersion = '1.38.0'
def protobufVersion = '3.12.0'
def protocVersion = protobufVersion
def protocVersion = protobufVersion

dependencies {
implementation "com.flipkart.grpc-jexpress:core:${jexpressVersion}"
Expand Down Expand Up @@ -74,6 +74,15 @@ task helloWorldServer(type: CreateStartScripts) {
classpath = startScripts.classpath
}

task runHelloWorldServer(type: JavaExec) {
group = "Execution"
description = "run hello-world-server"
classpath = sourceSets.main.runtimeClasspath
mainClass = 'com.flipkart.gjex.examples.helloworld.HelloWorldApplication'
args "server", "./src/main/resources/hello_world_config.yml"
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
}


task helloWorldClient(type: CreateStartScripts) {
mainClassName = 'com.flipkart.gjex.examples.helloworld.client.HelloWorldClient'
Expand All @@ -82,6 +91,14 @@ task helloWorldClient(type: CreateStartScripts) {
classpath = startScripts.classpath
}

task runHelloWorldClient(type: JavaExec) {
group = "Execution"
description = "run hello-world-client"
classpath = sourceSets.main.runtimeClasspath
mainClass = 'com.flipkart.gjex.examples.helloworld.client.HelloWorldClient'
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
}

applicationDistribution.into('bin') {
from(helloWorldServer)
from(helloWorldClient)
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion guice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
Expand Down
2 changes: 1 addition & 1 deletion runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
Expand Down