This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tour of Restate Java * Line up Typescript tour with Java tour --------- Co-authored-by: Giselle van Dongen <[email protected]>
- Loading branch information
Showing
60 changed files
with
1,313 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
node_modules/ | ||
dist/ | ||
|
||
.idea | ||
**/.idea | ||
.vscode | ||
|
||
npm-debug.log* | ||
*.tsbuildinfo | ||
.npm | ||
.eslintcache | ||
|
||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build | ||
|
||
.idea | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import com.google.protobuf.gradle.id | ||
|
||
plugins { | ||
java | ||
application | ||
|
||
id("com.google.protobuf") version "0.9.1" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
// OSSRH Snapshots repo | ||
// TODO remove it once we have the proper release | ||
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") } | ||
} | ||
|
||
val restateSdkVersion = "0.0.1-SNAPSHOT" | ||
|
||
dependencies { | ||
// Restate SDK | ||
implementation("dev.restate:sdk-api:$restateSdkVersion") | ||
implementation("dev.restate:sdk-http-vertx:$restateSdkVersion") | ||
// To use Jackson to read/write state entries (optional) | ||
implementation("dev.restate:sdk-serde-jackson:$restateSdkVersion") | ||
|
||
// Protobuf and grpc dependencies | ||
implementation("com.google.protobuf:protobuf-java:3.24.3") | ||
implementation("io.grpc:grpc-stub:1.58.0") | ||
implementation("io.grpc:grpc-protobuf:1.58.0") | ||
// This is needed to compile the @Generated annotation forced by the grpc compiler | ||
// See https://github.com/grpc/grpc-java/issues/9153 | ||
compileOnly("org.apache.tomcat:annotations-api:6.0.53") | ||
|
||
// Logging (optional) | ||
implementation("org.apache.logging.log4j:log4j-core:2.20.0") | ||
} | ||
|
||
// Configure protoc plugin | ||
protobuf { | ||
protoc { artifact = "com.google.protobuf:protoc:3.24.3" } | ||
|
||
// We need both grpc and restate codegen(s) because the restate codegen depends on the grpc one | ||
plugins { | ||
id("grpc") { artifact = "io.grpc:protoc-gen-grpc-java:1.58.0" } | ||
id("restate") { artifact = "dev.restate:protoc-gen-restate:$restateSdkVersion:all@jar" } | ||
} | ||
|
||
generateProtoTasks { | ||
all().forEach { | ||
it.plugins { | ||
id("grpc") | ||
id("restate") | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Set main class | ||
application { | ||
if (project.hasProperty("mainClass")) { | ||
mainClass.set(project.property("mainClass") as String); | ||
} else { | ||
mainClass.set("dev.restate.tour.app.AppMain") | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.