Skip to content

Commit 2d0cfa1

Browse files
committed
Update examples. Fixes #18
1 parent 6787fe3 commit 2d0cfa1

File tree

19 files changed

+4054
-4499
lines changed

19 files changed

+4054
-4499
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2.3.4
1515
- uses: actions/setup-node@v2.1.4
1616
with:
17-
node-version: 15
17+
node-version: 16
1818
- uses: actions/setup-java@v1
1919
with:
2020
java-version: 15

examples/gradle-ts-protoc-gen/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Install dependencies:
2020

2121
```sh
2222
npm install
23+
24+
# Apple M1 users should install for x64 due to grpc-tools not supporting arm64
25+
npm i --target_arch=x64
2326
```
2427

2528
Use Gradle & [`ts-protoc-gen`](https://www.npmjs.com/package/ts-protoc-gen) to generate the TypeScript files:

examples/gradle-ts-protoc-gen/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11

22
plugins {
33
id 'java'
4-
id 'com.google.protobuf' version '0.8.13'
4+
id 'com.google.protobuf' version '0.8.16'
55
id 'com.github.jlouns.cpe' version '0.5.0'
66
}
77

8-
project.ext.set('protobufVersion', '3.12.0')
8+
project.ext.set('protobufVersion', '3.16.0')
99
project.ext.set('protocVersion', project.protobufVersion)
1010

1111
def isWindows = System.getProperty('os.name').toLowerCase().contains('windows')
1212

1313
repositories {
14-
jcenter()
1514
mavenCentral()
1615
}
1716

@@ -25,7 +24,12 @@ sourceSets {
2524

2625
protobuf {
2726
protoc {
28-
artifact = "com.google.protobuf:protoc:${protocVersion}"
27+
if (osdetector.os == 'osx') {
28+
// Required for arm64 support on MacOS
29+
artifact = "com.google.protobuf:protoc:${protocVersion}:osx-x86_64"
30+
} else {
31+
artifact = "com.google.protobuf:protoc:${protocVersion}"
32+
}
2933
}
3034
plugins {
3135
grpc {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)