gowalk-cicd 1.0.16 → 1.0.17
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/action/.daemux-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.17
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.17
|
|
@@ -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())
|