Install sqlite3:1.4.4 gem to fix jazzy install step

Change-Id: I7f9b63a6cb841918d565ddd42c79c53ac4be9807
Bug: https://github.com/flutter/flutter/issues/111193
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/33664
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Nehal Patel <nehalvpatel@google.com>
(cherry picked from commit 2d1d7259537f4dc8ed7304e4b8ee672187c4212b)
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/33761
Commit-Queue: Keyong Han <keyonghan@google.com>
diff --git a/recipe_modules/flutter_deps/api.py b/recipe_modules/flutter_deps/api.py
index 5c54566..4962165 100644
--- a/recipe_modules/flutter_deps/api.py
+++ b/recipe_modules/flutter_deps/api.py
@@ -529,6 +529,19 @@
     with self.m.step.nest('Install jazzy'):
       self.m.file.ensure_directory('mkdir gems', gem_dir)
       with self.m.context(cwd=gem_dir):
+        # TODO: Un-pin sqlite3 version.
+        # https://github.com/flutter/flutter/issues/111226
+
+        # The next minor release of `sqlite3-ruby`, 1.5.0, caused build issues,
+        # so 1.4.4 is pinned. A proper fix should remove this step, as jazzy
+        # attempts to install sqlite3 on its own.
+        # https://github.com/flutter/flutter/issues/111193
+        self.m.step(
+            'install sqlite3', [
+                'gem', 'install', 'sqlite3:1.4.4',
+            '--install-dir', '.'
+            ]
+        )
         self.m.step(
             'install jazzy', [
                 'gem', 'install', 'jazzy:%s' % version,
diff --git a/recipe_modules/flutter_deps/examples/full.expected/basic.json b/recipe_modules/flutter_deps/examples/full.expected/basic.json
index f6f219c..641eeb1 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/basic.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/basic.json
@@ -571,6 +571,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json b/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
index 3b3aacb..1943950 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
@@ -655,6 +655,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json b/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
index f6f219c..641eeb1 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
@@ -571,6 +571,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/linux.json b/recipe_modules/flutter_deps/examples/full.expected/linux.json
index f6f219c..641eeb1 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/linux.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/linux.json
@@ -571,6 +571,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json b/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
index 80d5ef5..7f06672 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
@@ -655,6 +655,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/mac.json b/recipe_modules/flutter_deps/examples/full.expected/mac.json
index 9435b31..b92dac4 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/mac.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/mac.json
@@ -633,6 +633,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/windows.json b/recipe_modules/flutter_deps/examples/full.expected/windows.json
index 559d496..d0a343f 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/windows.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/windows.json
@@ -716,6 +716,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]\\gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json b/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
index bb89db0..705340e 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
@@ -571,6 +571,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."
diff --git a/recipe_modules/flutter_deps/examples/full.expected/with-gems.json b/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
index 5362bbc..be40aa5 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
@@ -571,6 +571,20 @@
     "cmd": [
       "gem",
       "install",
+      "sqlite3:1.4.4",
+      "--install-dir",
+      "."
+    ],
+    "cwd": "[START_DIR]/gems",
+    "name": "Install jazzy.install sqlite3",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "gem",
+      "install",
       "jazzy:0.9.5",
       "--install-dir",
       "."