gowalk-cicd 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -103,6 +103,33 @@ in Play Console; every later run detects API readiness and uploads to the
|
|
|
103
103
|
`internal` track automatically. Override the track or status with repository
|
|
104
104
|
variables `GOOGLE_PLAY_TRACK` and `GOOGLE_PLAY_STATUS`.
|
|
105
105
|
|
|
106
|
+
### Private git dependencies (Flutter)
|
|
107
|
+
|
|
108
|
+
A Flutter app can depend on private git packages:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
dependencies:
|
|
112
|
+
my_package:
|
|
113
|
+
git: https://github.com/my-org/my_package.git
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The runner has no credentials for those, so `flutter pub get` fails with
|
|
117
|
+
`could not read Username for 'https://github.com'`. Embedding a PAT in the URL
|
|
118
|
+
works but publishes the token into your source and into every copy of the
|
|
119
|
+
lockfile.
|
|
120
|
+
|
|
121
|
+
Set the repository **secret** `GIT_PRIVATE_TOKEN` instead — a PAT with `repo`
|
|
122
|
+
read access — and the workflow rewrites `https://github.com/` to an
|
|
123
|
+
authenticated remote for the duration of the job. Plain URLs keep working and
|
|
124
|
+
the token lives in one revocable place:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
gh secret set GIT_PRIVATE_TOKEN --repo my-org/my-app
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Without the secret the step is skipped, so repos that do not need it are
|
|
131
|
+
unaffected.
|
|
132
|
+
|
|
106
133
|
### Localized release notes
|
|
107
134
|
|
|
108
135
|
Both stores pick up per-locale release notes from committed files:
|
package/action/.daemux-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.18
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.18
|
|
@@ -203,3 +203,59 @@ class ToolchainTest(unittest.TestCase):
|
|
|
203
203
|
def test_an_unreadable_sdk_warns_per_tool(self):
|
|
204
204
|
messages = gw.ensure_toolchain(self.workspace, self.workspace / "nope")
|
|
205
205
|
self.assertEqual(sum("::warning::" in m for m in messages), 3)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
SETTINGS_KTS = """
|
|
209
|
+
plugins {
|
|
210
|
+
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
|
211
|
+
id("com.android.application") version "8.9.1" apply false
|
|
212
|
+
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
|
213
|
+
}
|
|
214
|
+
include(":app")
|
|
215
|
+
"""
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class KotlinDslTest(unittest.TestCase):
|
|
219
|
+
"""The Kotlin DSL spells a plugin id `id("x") version "y"`, Groovy spells it
|
|
220
|
+
`id "x" version "y"`. A matcher written against only one silently no-ops on
|
|
221
|
+
the other — and a no-op here means shipping an app whose AGP is still below
|
|
222
|
+
Flutter's floor while the log claims it was raised."""
|
|
223
|
+
|
|
224
|
+
def setUp(self):
|
|
225
|
+
self.tmp = tempfile.TemporaryDirectory()
|
|
226
|
+
self.workspace = Path(self.tmp.name)
|
|
227
|
+
android = self.workspace / "android"
|
|
228
|
+
android.mkdir()
|
|
229
|
+
self.settings = android / "settings.gradle.kts"
|
|
230
|
+
self.settings.write_text(SETTINGS_KTS, encoding="utf-8")
|
|
231
|
+
properties = gw.wrapper_properties(self.workspace)
|
|
232
|
+
properties.parent.mkdir(parents=True)
|
|
233
|
+
properties.write_text(WRAPPER, encoding="utf-8")
|
|
234
|
+
self.flutter = self.workspace / "flutter"
|
|
235
|
+
checker = self.flutter / gw._CHECKER
|
|
236
|
+
checker.parent.mkdir(parents=True)
|
|
237
|
+
checker.write_text(CHECKER_WITH_ALL_FLOORS, encoding="utf-8")
|
|
238
|
+
self.addCleanup(self.tmp.cleanup)
|
|
239
|
+
|
|
240
|
+
def test_finds_settings_gradle_kts(self):
|
|
241
|
+
self.assertIn("settings.gradle.kts", [f.name for f in gw.toolchain_files(self.workspace)])
|
|
242
|
+
|
|
243
|
+
def test_reads_both_plugin_ids_from_the_kotlin_dsl(self):
|
|
244
|
+
files = gw.toolchain_files(self.workspace)
|
|
245
|
+
self.assertEqual(gw.read_declared(files, "agp")[1], (8, 9, 1))
|
|
246
|
+
self.assertEqual(gw.read_declared(files, "kgp")[1], (2, 1, 0))
|
|
247
|
+
|
|
248
|
+
def test_actually_rewrites_the_kotlin_dsl(self):
|
|
249
|
+
gw.ensure_toolchain(self.workspace, self.flutter)
|
|
250
|
+
text = self.settings.read_text()
|
|
251
|
+
self.assertIn('id("com.android.application") version "8.11.1"', text)
|
|
252
|
+
# Untouched: 2.1.0 already meets the 2.0.0 floor.
|
|
253
|
+
self.assertIn('id("org.jetbrains.kotlin.android") version "2.1.0"', text)
|
|
254
|
+
# The loader's own version must not be caught by the AGP matcher.
|
|
255
|
+
self.assertIn('id("dev.flutter.flutter-plugin-loader") version "1.0.0"', text)
|
|
256
|
+
|
|
257
|
+
def test_reports_the_raise_only_when_the_file_really_changed(self):
|
|
258
|
+
messages = gw.ensure_toolchain(self.workspace, self.flutter)
|
|
259
|
+
raised = [m for m in messages if "Android Gradle Plugin 8.9.1 is below" in m]
|
|
260
|
+
self.assertEqual(len(raised), 1)
|
|
261
|
+
self.assertIn("8.11.1", self.settings.read_text())
|
package/package.json
CHANGED
package/templates/deploy.yml
CHANGED
|
@@ -143,6 +143,21 @@ jobs:
|
|
|
143
143
|
with:
|
|
144
144
|
channel: stable
|
|
145
145
|
cache: true
|
|
146
|
+
# Flutter apps can depend on private git packages. Most repos in this fleet
|
|
147
|
+
# embed a PAT directly in the pubspec URL, which publishes the token into
|
|
148
|
+
# source and into every fork of the lockfile. Setting the optional
|
|
149
|
+
# GIT_PRIVATE_TOKEN secret instead lets plain
|
|
150
|
+
# https://github.com/<org>/<repo>.git URLs resolve on the runner, so the
|
|
151
|
+
# token lives in one revocable place. No secret, no step — repos that do
|
|
152
|
+
# not need it are unaffected.
|
|
153
|
+
- name: Authenticate private git dependencies
|
|
154
|
+
if: ${{ steps.mode.outputs.mode == 'local' && steps.flutter.outputs.enabled == 'true' && secrets.GIT_PRIVATE_TOKEN != '' }}
|
|
155
|
+
shell: bash
|
|
156
|
+
env:
|
|
157
|
+
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
158
|
+
run: |
|
|
159
|
+
git config --global url."https://x-access-token:${GIT_PRIVATE_TOKEN}@github.com/".insteadOf "https://github.com/"
|
|
160
|
+
echo "::add-mask::$GIT_PRIVATE_TOKEN"
|
|
146
161
|
# Same reason as the iOS job: apps using AppLocalizations must generate it
|
|
147
162
|
# before anything analyses or compiles them. No-op for apps without l10n.
|
|
148
163
|
- name: Generate localizations
|