You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dataconnect: fix updateJson task to find Data Connect executables whose file name is updated to also include the cpu architecture.
This naming change started with Data Connect executable version 2.16.0,
which started to be published in both x86_64 and arm64 variants. For
example, the file name for the macos emulator version 2.15.1 was
`dataconnect-emulator-macos-v2.15.1` but in 2.16.0 there were two
executables named `dataconnect-emulator-macos-amd64-v2.16.0` and
`dataconnect-emulator-macos-arm64-v2.16.0` (the only difference being
one is named "amd64" and the other "arm64").
Copy file name to clipboardExpand all lines: firebase-dataconnect/gradleplugin/plugin/src/main/kotlin/com/google/firebase/dataconnect/gradle/plugin/DataConnectExecutableVersionRegistry.kt
Copy file name to clipboardExpand all lines: firebase-dataconnect/gradleplugin/plugin/src/main/kotlin/com/google/firebase/dataconnect/gradle/plugin/UpdateDataConnectExecutableVersionsTask.kt
+64-17Lines changed: 64 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,7 @@ abstract class UpdateDataConnectExecutableVersionsTask : DefaultTask() {
130
130
privatedata classCloudStorageVersionInfo(
131
131
valversion:Version,
132
132
valoperatingSystem:OperatingSystem,
133
+
valcpuArchitecture:CpuArchitecture?,
133
134
valblob:Blob,
134
135
)
135
136
@@ -171,7 +172,7 @@ abstract class UpdateDataConnectExecutableVersionsTask : DefaultTask() {
171
172
returnnull
172
173
}
173
174
174
-
val versionString = match.groups[2]?.value
175
+
val versionString = match.groups["version"]?.value
175
176
val version = versionString?.toVersionOrNull(strict =false)
176
177
if (version ===null) {
177
178
logger.info(
@@ -205,7 +206,7 @@ abstract class UpdateDataConnectExecutableVersionsTask : DefaultTask() {
205
206
}
206
207
207
208
val operatingSystem =
208
-
when (val operatingSystemString = match.groups[1]?.value) {
209
+
when (val operatingSystemString = match.groups["os"]?.value) {
209
210
"linux"->OperatingSystem.Linux
210
211
"macos"->OperatingSystem.MacOS
211
212
"windows"->OperatingSystem.Windows
@@ -221,15 +222,32 @@ abstract class UpdateDataConnectExecutableVersionsTask : DefaultTask() {
0 commit comments