Skip to content

Commit cbacdbd

Browse files
committed
Adds gradle mustache templates
1 parent 7b6ac07 commit cbacdbd

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
plugins {
2+
id 'org.jetbrains.kotlin.jvm' version '1.8.20'
3+
id 'com.squareup.wire' version '4.9.1'
4+
}
5+
6+
group '{{groupId}}'
7+
version '{{artifactVersion}}'
8+
9+
repositories {
10+
mavenCentral()
11+
}
12+
13+
dependencies {
14+
implementation 'com.squareup.misk:misk:{{miskVersion}}'
15+
implementation 'com.squareup.wire:wire-runtime:4.9.1'
16+
implementation 'com.squareup.wire:wire-moshi-adapter:4.9.1'
17+
18+
testImplementation 'junit:junit:4.13.2'
19+
testImplementation 'com.squareup.misk:misk-testing:{{miskVersion}}'
20+
}
21+
22+
wire {
23+
kotlin {
24+
rpcCallStyle = 'suspending'
25+
singleMethodServices = true
26+
protoPath {
27+
srcDir 'proto'
28+
}
29+
}
30+
}
31+
32+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
33+
kotlinOptions {
34+
jvmTarget = '17'
35+
}
36+
}
37+
38+
apply from: 'proto.gradle'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Wire-specific configuration
2+
wire {
3+
kotlin {
4+
javaInterop = true
5+
nameSuffix = 'Proto'
6+
}
7+
}
8+
9+
// Clean task for generated code
10+
tasks.register('cleanGeneratedCode', Delete) {
11+
delete fileTree("${projectDir}/proto") {
12+
include '**/*.proto'
13+
}
14+
delete fileTree("${projectDir}/src/main/kotlin") {
15+
include '**/wire/**/*.kt'
16+
}
17+
}

0 commit comments

Comments
 (0)