Skip to content

Commit 59eb334

Browse files
committed
init commit
0 parents  commit 59eb334

18 files changed

+1254
-0
lines changed

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import com.google.protobuf.gradle.*
2+
3+
plugins {
4+
kotlin("jvm") version "1.9.23"
5+
id("com.google.protobuf") version "0.9.4"
6+
}
7+
8+
group = "org.example"
9+
version = "1.0-SNAPSHOT"
10+
11+
repositories {
12+
mavenCentral()
13+
}
14+
15+
protobuf {
16+
protoc {
17+
// The artifact spec for the Protobuf Compiler
18+
artifact = "com.google.protobuf:protoc:3.6.1"
19+
}
20+
plugins {
21+
// Optional: an artifact spec for a protoc plugin, with "grpc" as
22+
// the identifier, which can be referred to in the "plugins"
23+
// container of the "generateProtoTasks" closure.
24+
id("grpc") {
25+
artifact = "io.grpc:protoc-gen-grpc-java:1.15.1"
26+
}
27+
}
28+
generateProtoTasks {
29+
ofSourceSet("main").forEach {
30+
it.plugins {
31+
// Apply the "grpc" plugin whose spec is defined above, without
32+
// options. Note the braces cannot be omitted, otherwise the
33+
// plugin will not be added. This is because of the implicit way
34+
// NamedDomainObjectContainer binds the methods.
35+
id("grpc") { }
36+
}
37+
}
38+
}
39+
// generateProtoTasks {
40+
// all().forEach { task ->
41+
// task.plugins {
42+
// id("grpc")
43+
// id("grpckt")
44+
// }
45+
// }
46+
// }
47+
}
48+
49+
dependencies {
50+
implementation("io.grpc:grpc-netty-shaded:1.57.0")
51+
implementation("io.grpc:grpc-protobuf:1.57.0")
52+
implementation("io.grpc:grpc-stub:1.57.0")
53+
implementation("com.google.protobuf:protobuf-kotlin:3.22.0")
54+
implementation("io.grpc:grpc-kotlin-stub:1.3.0")
55+
implementation("javax.annotation:javax.annotation-api:1.3.2")
56+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
57+
testImplementation("org.jetbrains.kotlin:kotlin-test")
58+
59+
}
60+
61+
sourceSets {
62+
main {
63+
java {
64+
srcDirs("build/generated/source/proto/main/java")
65+
srcDirs("build/generated/source/proto/main/grpc")
66+
}
67+
}
68+
}
69+
70+
tasks.test {
71+
useJUnitPlatform()
72+
}
73+
74+
kotlin {
75+
jvmToolchain(11)
76+
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Aug 04 15:57:23 IST 2024
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)