@invarn/cibuild 2.9.6 → 2.9.8
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/dist/chunk-35SI42CD.mjs +1 -0
- package/dist/chunk-IC45KVLJ.mjs +1 -0
- package/dist/chunk-XDY4V23V.mjs +1 -0
- package/dist/cli.cjs +14 -14
- package/dist/commands.mjs +1 -0
- package/dist/lib.mjs +3934 -0
- package/package.json +6 -10
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -399
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts +0 -38
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.js +0 -222
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts +0 -41
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.js +0 -324
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts +0 -2
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts.map +0 -1
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.js +0 -382
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts +0 -29
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map +0 -1
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js +0 -160
- package/dist/src/commands/android-gms-guard.test.d.ts +0 -9
- package/dist/src/commands/android-gms-guard.test.d.ts.map +0 -1
- package/dist/src/commands/android-gms-guard.test.js +0 -78
- package/dist/src/commands/android-java-version.test.d.ts +0 -12
- package/dist/src/commands/android-java-version.test.d.ts.map +0 -1
- package/dist/src/commands/android-java-version.test.js +0 -209
- package/dist/src/commands/android-scanner-java.test.d.ts +0 -2
- package/dist/src/commands/android-scanner-java.test.d.ts.map +0 -1
- package/dist/src/commands/android-scanner-java.test.js +0 -130
- package/dist/src/commands/android-scanner.d.ts +0 -250
- package/dist/src/commands/android-scanner.d.ts.map +0 -1
- package/dist/src/commands/android-scanner.js +0 -1639
- package/dist/src/commands/build.d.ts +0 -215
- package/dist/src/commands/build.d.ts.map +0 -1
- package/dist/src/commands/build.js +0 -1433
- package/dist/src/commands/build.test.d.ts +0 -13
- package/dist/src/commands/build.test.d.ts.map +0 -1
- package/dist/src/commands/build.test.js +0 -121
- package/dist/src/commands/detect-platform.d.ts +0 -13
- package/dist/src/commands/detect-platform.d.ts.map +0 -1
- package/dist/src/commands/detect-platform.js +0 -51
- package/dist/src/commands/detect-project.d.ts +0 -7
- package/dist/src/commands/detect-project.d.ts.map +0 -1
- package/dist/src/commands/detect-project.js +0 -12
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts +0 -26
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts.map +0 -1
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.js +0 -196
- package/dist/src/commands/edit.d.ts +0 -12
- package/dist/src/commands/edit.d.ts.map +0 -1
- package/dist/src/commands/edit.js +0 -652
- package/dist/src/commands/edit.test.d.ts +0 -6
- package/dist/src/commands/edit.test.d.ts.map +0 -1
- package/dist/src/commands/edit.test.js +0 -45
- package/dist/src/commands/fidelity-trim.d.ts +0 -13
- package/dist/src/commands/fidelity-trim.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.js +0 -21
- package/dist/src/commands/fidelity-trim.test.d.ts +0 -8
- package/dist/src/commands/fidelity-trim.test.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.test.js +0 -79
- package/dist/src/commands/file-secret-collector.d.ts +0 -50
- package/dist/src/commands/file-secret-collector.d.ts.map +0 -1
- package/dist/src/commands/file-secret-collector.js +0 -217
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts +0 -38
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts.map +0 -1
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.js +0 -300
- package/dist/src/commands/github-workflow.d.ts +0 -5
- package/dist/src/commands/github-workflow.d.ts.map +0 -1
- package/dist/src/commands/github-workflow.js +0 -45
- package/dist/src/commands/index.d.ts +0 -33
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -33
- package/dist/src/commands/init.d.ts +0 -20
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -264
- package/dist/src/commands/ios-scanner.d.ts +0 -104
- package/dist/src/commands/ios-scanner.d.ts.map +0 -1
- package/dist/src/commands/ios-scanner.js +0 -492
- package/dist/src/commands/ios-scheme-ranking.test.d.ts +0 -2
- package/dist/src/commands/ios-scheme-ranking.test.d.ts.map +0 -1
- package/dist/src/commands/ios-scheme-ranking.test.js +0 -264
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts +0 -30
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/local-properties-reaches-every-workflow.test.js +0 -146
- package/dist/src/commands/reset.d.ts +0 -7
- package/dist/src/commands/reset.d.ts.map +0 -1
- package/dist/src/commands/reset.js +0 -81
- package/dist/src/commands/run.d.ts +0 -22
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js +0 -141
- package/dist/src/commands/secrets-sync-workflow.d.ts +0 -15
- package/dist/src/commands/secrets-sync-workflow.d.ts.map +0 -1
- package/dist/src/commands/secrets-sync-workflow.js +0 -255
- package/dist/src/commands/secrets-upload.d.ts +0 -21
- package/dist/src/commands/secrets-upload.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.js +0 -177
- package/dist/src/commands/secrets-upload.test.d.ts +0 -5
- package/dist/src/commands/secrets-upload.test.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.test.js +0 -60
- package/dist/src/commands/validate.d.ts +0 -10
- package/dist/src/commands/validate.d.ts.map +0 -1
- package/dist/src/commands/validate.js +0 -46
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -47
- package/dist/src/envman/cli.d.ts +0 -21
- package/dist/src/envman/cli.d.ts.map +0 -1
- package/dist/src/envman/cli.js +0 -240
- package/dist/src/envman/envman.d.ts +0 -83
- package/dist/src/envman/envman.d.ts.map +0 -1
- package/dist/src/envman/envman.js +0 -361
- package/dist/src/envman/envman.test.d.ts +0 -5
- package/dist/src/envman/envman.test.d.ts.map +0 -1
- package/dist/src/envman/envman.test.js +0 -236
- package/dist/src/envman/envstore-round-trip.test.d.ts +0 -27
- package/dist/src/envman/envstore-round-trip.test.d.ts.map +0 -1
- package/dist/src/envman/envstore-round-trip.test.js +0 -130
- package/dist/src/envman/index.d.ts +0 -23
- package/dist/src/envman/index.d.ts.map +0 -1
- package/dist/src/envman/index.js +0 -23
- package/dist/src/envman/shim.d.ts +0 -16
- package/dist/src/envman/shim.d.ts.map +0 -1
- package/dist/src/envman/shim.js +0 -66
- package/dist/src/envman/types.d.ts +0 -55
- package/dist/src/envman/types.d.ts.map +0 -1
- package/dist/src/envman/types.js +0 -12
- package/dist/src/lib.d.ts +0 -33
- package/dist/src/lib.d.ts.map +0 -1
- package/dist/src/lib.js +0 -37
- package/dist/src/pipeline.d.ts +0 -3
- package/dist/src/pipeline.d.ts.map +0 -1
- package/dist/src/pipeline.js +0 -57
- package/dist/src/runner-node-step.test.d.ts +0 -12
- package/dist/src/runner-node-step.test.d.ts.map +0 -1
- package/dist/src/runner-node-step.test.js +0 -61
- package/dist/src/runner.d.ts +0 -31
- package/dist/src/runner.d.ts.map +0 -1
- package/dist/src/runner.js +0 -240
- package/dist/src/shared/detect-project.d.ts +0 -57
- package/dist/src/shared/detect-project.d.ts.map +0 -1
- package/dist/src/shared/detect-project.js +0 -219
- package/dist/src/shared/detect-project.test.d.ts +0 -2
- package/dist/src/shared/detect-project.test.d.ts.map +0 -1
- package/dist/src/shared/detect-project.test.js +0 -161
- package/dist/src/shared/git.d.ts +0 -25
- package/dist/src/shared/git.d.ts.map +0 -1
- package/dist/src/shared/git.js +0 -53
- package/dist/src/shared/git.test.d.ts +0 -9
- package/dist/src/shared/git.test.d.ts.map +0 -1
- package/dist/src/shared/git.test.js +0 -66
- package/dist/src/shared/gitignore.d.ts +0 -6
- package/dist/src/shared/gitignore.d.ts.map +0 -1
- package/dist/src/shared/gitignore.js +0 -26
- package/dist/src/shared/gradle-settings.d.ts +0 -49
- package/dist/src/shared/gradle-settings.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.js +0 -138
- package/dist/src/shared/gradle-settings.test.d.ts +0 -2
- package/dist/src/shared/gradle-settings.test.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.test.js +0 -65
- package/dist/src/shared/prompts.d.ts +0 -30
- package/dist/src/shared/prompts.d.ts.map +0 -1
- package/dist/src/shared/prompts.js +0 -121
- package/dist/src/shared/xcode-container.test.d.ts +0 -2
- package/dist/src/shared/xcode-container.test.d.ts.map +0 -1
- package/dist/src/shared/xcode-container.test.js +0 -123
- package/dist/src/step-marker.d.ts +0 -12
- package/dist/src/step-marker.d.ts.map +0 -1
- package/dist/src/step-marker.js +0 -29
- package/dist/src/step-marker.test.d.ts +0 -11
- package/dist/src/step-marker.test.d.ts.map +0 -1
- package/dist/src/step-marker.test.js +0 -45
- package/dist/src/types.d.ts +0 -58
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts +0 -28
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts.map +0 -1
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.js +0 -223
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts +0 -20
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.js +0 -201
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts +0 -37
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.js +0 -255
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts +0 -32
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts.map +0 -1
- package/dist/src/yaml/a-missing-credential-is-loud.test.js +0 -301
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts +0 -18
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts.map +0 -1
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.js +0 -66
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts +0 -34
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js +0 -218
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts +0 -27
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.js +0 -126
- package/dist/src/yaml/bitrise-compat.d.ts +0 -65
- package/dist/src/yaml/bitrise-compat.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.js +0 -206
- package/dist/src/yaml/bitrise-compat.test.d.ts +0 -5
- package/dist/src/yaml/bitrise-compat.test.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.test.js +0 -347
- package/dist/src/yaml/cache-key-missing-file.test.d.ts +0 -12
- package/dist/src/yaml/cache-key-missing-file.test.d.ts.map +0 -1
- package/dist/src/yaml/cache-key-missing-file.test.js +0 -116
- package/dist/src/yaml/converter.d.ts +0 -103
- package/dist/src/yaml/converter.d.ts.map +0 -1
- package/dist/src/yaml/converter.js +0 -420
- package/dist/src/yaml/converter.test.d.ts +0 -5
- package/dist/src/yaml/converter.test.d.ts.map +0 -1
- package/dist/src/yaml/converter.test.js +0 -548
- package/dist/src/yaml/e2e.test.d.ts +0 -6
- package/dist/src/yaml/e2e.test.d.ts.map +0 -1
- package/dist/src/yaml/e2e.test.js +0 -446
- package/dist/src/yaml/env-resolver.d.ts +0 -218
- package/dist/src/yaml/env-resolver.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.js +0 -591
- package/dist/src/yaml/env-resolver.test.d.ts +0 -5
- package/dist/src/yaml/env-resolver.test.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.test.js +0 -502
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts +0 -16
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts.map +0 -1
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.js +0 -126
- package/dist/src/yaml/fidelity-input-digest.d.ts +0 -37
- package/dist/src/yaml/fidelity-input-digest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.js +0 -208
- package/dist/src/yaml/fidelity-input-digest.test.d.ts +0 -2
- package/dist/src/yaml/fidelity-input-digest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.test.js +0 -167
- package/dist/src/yaml/fidelity-manifest.d.ts +0 -126
- package/dist/src/yaml/fidelity-manifest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.js +0 -134
- package/dist/src/yaml/fidelity-manifest.test.d.ts +0 -12
- package/dist/src/yaml/fidelity-manifest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.test.js +0 -251
- package/dist/src/yaml/interactive-prompts.d.ts +0 -71
- package/dist/src/yaml/interactive-prompts.d.ts.map +0 -1
- package/dist/src/yaml/interactive-prompts.js +0 -260
- package/dist/src/yaml/meta-helpers.d.ts +0 -28
- package/dist/src/yaml/meta-helpers.d.ts.map +0 -1
- package/dist/src/yaml/meta-helpers.js +0 -46
- package/dist/src/yaml/missing-env-handler.d.ts +0 -45
- package/dist/src/yaml/missing-env-handler.d.ts.map +0 -1
- package/dist/src/yaml/missing-env-handler.js +0 -64
- package/dist/src/yaml/parser.d.ts +0 -33
- package/dist/src/yaml/parser.d.ts.map +0 -1
- package/dist/src/yaml/parser.js +0 -148
- package/dist/src/yaml/parser.test.d.ts +0 -5
- package/dist/src/yaml/parser.test.d.ts.map +0 -1
- package/dist/src/yaml/parser.test.js +0 -83
- package/dist/src/yaml/pipeline-with-secrets.d.ts +0 -25
- package/dist/src/yaml/pipeline-with-secrets.d.ts.map +0 -1
- package/dist/src/yaml/pipeline-with-secrets.js +0 -76
- package/dist/src/yaml/platform-detector.d.ts +0 -83
- package/dist/src/yaml/platform-detector.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.js +0 -189
- package/dist/src/yaml/platform-detector.test.d.ts +0 -5
- package/dist/src/yaml/platform-detector.test.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.test.js +0 -525
- package/dist/src/yaml/preflight-validation.d.ts +0 -29
- package/dist/src/yaml/preflight-validation.d.ts.map +0 -1
- package/dist/src/yaml/preflight-validation.js +0 -21
- package/dist/src/yaml/secrets-manager.d.ts +0 -87
- package/dist/src/yaml/secrets-manager.d.ts.map +0 -1
- package/dist/src/yaml/secrets-manager.js +0 -230
- package/dist/src/yaml/shell-assignments.d.ts +0 -40
- package/dist/src/yaml/shell-assignments.d.ts.map +0 -1
- package/dist/src/yaml/shell-assignments.js +0 -77
- package/dist/src/yaml/step-validator-check-failure.test.d.ts +0 -24
- package/dist/src/yaml/step-validator-check-failure.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-check-failure.test.js +0 -130
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts +0 -23
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-self-assigned.test.js +0 -191
- package/dist/src/yaml/step-validator.d.ts +0 -67
- package/dist/src/yaml/step-validator.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.js +0 -466
- package/dist/src/yaml/step-validator.test.d.ts +0 -18
- package/dist/src/yaml/step-validator.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.test.js +0 -140
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts +0 -2
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.js +0 -96
- package/dist/src/yaml/steps/android-sign.d.ts +0 -35
- package/dist/src/yaml/steps/android-sign.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-sign.js +0 -147
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts +0 -2
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-variant-resolution.test.js +0 -260
- package/dist/src/yaml/steps/android-version.d.ts +0 -26
- package/dist/src/yaml/steps/android-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.js +0 -128
- package/dist/src/yaml/steps/android-version.test.d.ts +0 -5
- package/dist/src/yaml/steps/android-version.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.test.js +0 -196
- package/dist/src/yaml/steps/android.d.ts +0 -156
- package/dist/src/yaml/steps/android.d.ts.map +0 -1
- package/dist/src/yaml/steps/android.js +0 -1100
- package/dist/src/yaml/steps/app-store-deploy.d.ts +0 -48
- package/dist/src/yaml/steps/app-store-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/app-store-deploy.js +0 -167
- package/dist/src/yaml/steps/base.d.ts +0 -263
- package/dist/src/yaml/steps/base.d.ts.map +0 -1
- package/dist/src/yaml/steps/base.js +0 -380
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts +0 -26
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.js +0 -200
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.test.js +0 -280
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts +0 -22
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.js +0 -144
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.test.js +0 -331
- package/dist/src/yaml/steps/bitrise-slack.d.ts +0 -49
- package/dist/src/yaml/steps/bitrise-slack.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.js +0 -280
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.test.js +0 -484
- package/dist/src/yaml/steps/bitrise-ssh.d.ts +0 -27
- package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.js +0 -134
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.test.js +0 -205
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-daemon.test.js +0 -212
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts +0 -42
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.js +0 -209
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-push-daemon.test.js +0 -171
- package/dist/src/yaml/steps/cache.d.ts +0 -59
- package/dist/src/yaml/steps/cache.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache.js +0 -1027
- package/dist/src/yaml/steps/capture-injection.d.ts +0 -30
- package/dist/src/yaml/steps/capture-injection.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.js +0 -88
- package/dist/src/yaml/steps/capture-injection.test.d.ts +0 -2
- package/dist/src/yaml/steps/capture-injection.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.test.js +0 -163
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts +0 -42
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.js +0 -140
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts +0 -11
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.js +0 -176
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts +0 -22
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.js +0 -97
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.js +0 -282
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.js +0 -132
- package/dist/src/yaml/steps/envstore-loader.test.d.ts +0 -15
- package/dist/src/yaml/steps/envstore-loader.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/envstore-loader.test.js +0 -143
- package/dist/src/yaml/steps/fastlane.d.ts +0 -27
- package/dist/src/yaml/steps/fastlane.d.ts.map +0 -1
- package/dist/src/yaml/steps/fastlane.js +0 -79
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts +0 -53
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.js +0 -72
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts +0 -11
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.js +0 -50
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts +0 -87
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.js +0 -111
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts +0 -22
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.js +0 -118
- package/dist/src/yaml/steps/file.d.ts +0 -52
- package/dist/src/yaml/steps/file.d.ts.map +0 -1
- package/dist/src/yaml/steps/file.js +0 -108
- package/dist/src/yaml/steps/flutter.d.ts +0 -63
- package/dist/src/yaml/steps/flutter.d.ts.map +0 -1
- package/dist/src/yaml/steps/flutter.js +0 -215
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts +0 -16
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.js +0 -127
- package/dist/src/yaml/steps/git-clone.d.ts +0 -32
- package/dist/src/yaml/steps/git-clone.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone.js +0 -171
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts +0 -10
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.js +0 -162
- package/dist/src/yaml/steps/git-fetch-retry.d.ts +0 -62
- package/dist/src/yaml/steps/git-fetch-retry.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.js +0 -155
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts +0 -5
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.test.js +0 -86
- package/dist/src/yaml/steps/google-play-deploy.d.ts +0 -37
- package/dist/src/yaml/steps/google-play-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.js +0 -193
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts +0 -5
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.test.js +0 -310
- package/dist/src/yaml/steps/gradle-memory.d.ts +0 -91
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -495
- package/dist/src/yaml/steps/gradle-memory.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-memory.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.test.js +0 -344
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts +0 -28
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.js +0 -107
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.js +0 -183
- package/dist/src/yaml/steps/index.d.ts +0 -10
- package/dist/src/yaml/steps/index.d.ts.map +0 -1
- package/dist/src/yaml/steps/index.js +0 -1461
- package/dist/src/yaml/steps/ios-deps.d.ts +0 -78
- package/dist/src/yaml/steps/ios-deps.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.js +0 -279
- package/dist/src/yaml/steps/ios-deps.test.d.ts +0 -5
- package/dist/src/yaml/steps/ios-deps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.test.js +0 -90
- package/dist/src/yaml/steps/ios-signing.d.ts +0 -31
- package/dist/src/yaml/steps/ios-signing.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-signing.js +0 -144
- package/dist/src/yaml/steps/ios-version.d.ts +0 -47
- package/dist/src/yaml/steps/ios-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-version.js +0 -151
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts +0 -10
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/java-home-version-spec.test.js +0 -58
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.d.ts +0 -2
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.js +0 -139
- package/dist/src/yaml/steps/linting.d.ts +0 -47
- package/dist/src/yaml/steps/linting.d.ts.map +0 -1
- package/dist/src/yaml/steps/linting.js +0 -148
- package/dist/src/yaml/steps/phase2.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase2.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase2.test.js +0 -197
- package/dist/src/yaml/steps/phase3.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase3.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase3.test.js +0 -144
- package/dist/src/yaml/steps/phase4.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase4.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase4.test.js +0 -166
- package/dist/src/yaml/steps/phase5.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase5.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase5.test.js +0 -263
- package/dist/src/yaml/steps/registry.d.ts +0 -88
- package/dist/src/yaml/steps/registry.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.js +0 -125
- package/dist/src/yaml/steps/registry.test.d.ts +0 -5
- package/dist/src/yaml/steps/registry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.test.js +0 -235
- package/dist/src/yaml/steps/release.d.ts +0 -50
- package/dist/src/yaml/steps/release.d.ts.map +0 -1
- package/dist/src/yaml/steps/release.js +0 -154
- package/dist/src/yaml/steps/render-post-processor.d.ts +0 -100
- package/dist/src/yaml/steps/render-post-processor.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.js +0 -270
- package/dist/src/yaml/steps/render-post-processor.test.d.ts +0 -13
- package/dist/src/yaml/steps/render-post-processor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.test.js +0 -220
- package/dist/src/yaml/steps/script.d.ts +0 -23
- package/dist/src/yaml/steps/script.d.ts.map +0 -1
- package/dist/src/yaml/steps/script.js +0 -63
- package/dist/src/yaml/steps/spec-validation.test.d.ts +0 -6
- package/dist/src/yaml/steps/spec-validation.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/spec-validation.test.js +0 -130
- package/dist/src/yaml/steps/steps.test.d.ts +0 -6
- package/dist/src/yaml/steps/steps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/steps.test.js +0 -881
- package/dist/src/yaml/steps/structural-facts.d.ts +0 -992
- package/dist/src/yaml/steps/structural-facts.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -3276
- package/dist/src/yaml/steps/structural-facts.test.d.ts +0 -12
- package/dist/src/yaml/steps/structural-facts.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.test.js +0 -3039
- package/dist/src/yaml/steps/test-config.d.ts +0 -5
- package/dist/src/yaml/steps/test-config.d.ts.map +0 -1
- package/dist/src/yaml/steps/test-config.js +0 -25
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts +0 -28
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align-corpus.test.js +0 -383
- package/dist/src/yaml/steps/trim-align.d.ts +0 -87
- package/dist/src/yaml/steps/trim-align.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.js +0 -367
- package/dist/src/yaml/steps/trim-align.test.d.ts +0 -11
- package/dist/src/yaml/steps/trim-align.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.test.js +0 -261
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts +0 -66
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.js +0 -251
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts +0 -13
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.js +0 -302
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts +0 -134
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.js +0 -173
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts +0 -11
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.test.js +0 -210
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts +0 -155
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +0 -1389
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts +0 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +0 -1106
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts +0 -230
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.js +0 -1597
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts +0 -18
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.test.js +0 -1871
- package/dist/src/yaml/steps/xcode-app-product.d.ts +0 -90
- package/dist/src/yaml/steps/xcode-app-product.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.js +0 -247
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts +0 -2
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.test.js +0 -202
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts +0 -30
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-derived-data.test.js +0 -279
- package/dist/src/yaml/steps/xcode-destination.d.ts +0 -47
- package/dist/src/yaml/steps/xcode-destination.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.js +0 -202
- package/dist/src/yaml/steps/xcode-destination.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-destination.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.test.js +0 -227
- package/dist/src/yaml/steps/xcode-new.test.d.ts +0 -5
- package/dist/src/yaml/steps/xcode-new.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-new.test.js +0 -211
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-resolve-retry.test.js +0 -146
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts +0 -53
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.js +0 -98
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts +0 -21
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.test.js +0 -155
- package/dist/src/yaml/steps/xcode.d.ts +0 -230
- package/dist/src/yaml/steps/xcode.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode.js +0 -1350
- package/dist/src/yaml/types.d.ts +0 -76
- package/dist/src/yaml/types.d.ts.map +0 -1
- package/dist/src/yaml/types.js +0 -5
- package/dist/src/yaml/validation-types.d.ts +0 -102
- package/dist/src/yaml/validation-types.d.ts.map +0 -1
- package/dist/src/yaml/validation-types.js +0 -8
- package/dist/src/yaml/yaml-updater.d.ts +0 -24
- package/dist/src/yaml/yaml-updater.d.ts.map +0 -1
- package/dist/src/yaml/yaml-updater.js +0 -128
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A project that pins org.gradle.java.home to a JDK this machine does not
|
|
3
|
-
* have is run with the build's JDK by every Gradle invocation in the build,
|
|
4
|
-
* not only the Gradle steps.
|
|
5
|
-
*
|
|
6
|
-
* The Gradle steps pass -Dorg.gradle.java.home on their own command line, but
|
|
7
|
-
* a script step that calls ./gradlew itself does not, and neither does a
|
|
8
|
-
* build phase Xcode runs. SEAbdulbasit/MusicApp-KMP got past its Android step
|
|
9
|
-
* that way and then stopped in a script step's ./gradlew on "Value
|
|
10
|
-
* '/Users/abdulbasit/...' given for org.gradle.java.home Gradle property is
|
|
11
|
-
* invalid". The one place every one of those reads is the checkout's
|
|
12
|
-
* gradle.properties, so set-java-version, which picks the build's JDK, writes
|
|
13
|
-
* it there.
|
|
14
|
-
*
|
|
15
|
-
* The fixture is MusicApp-KMP's own gradle.properties (test/fixtures/gradle-java-home/SOURCE.txt).
|
|
16
|
-
* The shell under test is the one that ships: it is executed here.
|
|
17
|
-
*/
|
|
18
|
-
import { execFileSync } from "node:child_process";
|
|
19
|
-
import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
20
|
-
import { tmpdir } from "node:os";
|
|
21
|
-
import { dirname, join } from "node:path";
|
|
22
|
-
import { fileURLToPath } from "node:url";
|
|
23
|
-
import { SetJavaVersionStepExecutor } from "./android.js";
|
|
24
|
-
import { GRADLE_JAVA_HOME_PIN_FUNCTIONS } from "./gradle-memory.js";
|
|
25
|
-
import { testConfig } from "./test-config.js";
|
|
26
|
-
const FIXTURE = join(dirname(fileURLToPath(import.meta.url)), "../../../test/fixtures/gradle-java-home/musicapp-kmp.gradle.properties");
|
|
27
|
-
const PINNED = "/Users/abdulbasit/Library/Java/JavaVirtualMachines/corretto-21.0.3/Contents/Home";
|
|
28
|
-
let dir;
|
|
29
|
-
let jdk;
|
|
30
|
-
beforeEach(() => {
|
|
31
|
-
dir = mkdtempSync(join(tmpdir(), "cibuild-java-home-pin-"));
|
|
32
|
-
jdk = join(dir, "jdk");
|
|
33
|
-
mkdirSync(jdk);
|
|
34
|
-
});
|
|
35
|
-
afterEach(() => rmSync(dir, { recursive: true, force: true }));
|
|
36
|
-
function pin(checkout, env) {
|
|
37
|
-
return execFileSync("bash", ["-c", `${GRADLE_JAVA_HOME_PIN_FUNCTIONS}\ncibuild_gradle_java_home_pin`], {
|
|
38
|
-
cwd: checkout,
|
|
39
|
-
encoding: "utf-8",
|
|
40
|
-
env: { PATH: process.env.PATH ?? "", ...env },
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
describe("cibuild_gradle_java_home_pin", () => {
|
|
44
|
-
test("MusicApp-KMP: the developer's JDK line names the build's, so a plain ./gradlew reads it too", () => {
|
|
45
|
-
const checkout = join(dir, "repo");
|
|
46
|
-
mkdirSync(checkout);
|
|
47
|
-
copyFileSync(FIXTURE, join(checkout, "gradle.properties"));
|
|
48
|
-
const out = pin(checkout, { JAVA_HOME: jdk });
|
|
49
|
-
const lines = readFileSync(join(checkout, "gradle.properties"), "utf-8").trimEnd().split("\n");
|
|
50
|
-
expect(lines[2]).toBe(`org.gradle.java.home=${jdk}`);
|
|
51
|
-
// Nothing else in the file moves (awk ends the last line with a newline).
|
|
52
|
-
const before = readFileSync(FIXTURE, "utf-8").split("\n");
|
|
53
|
-
expect(lines.filter((_, i) => i !== 2)).toEqual(before.filter((_, i) => i !== 2));
|
|
54
|
-
expect(out).toContain(`Gradle: org.gradle.java.home=${PINNED} at gradle.properties:3 is not on this machine`);
|
|
55
|
-
expect(out).toContain(jdk);
|
|
56
|
-
});
|
|
57
|
-
test("a nested Gradle project's file is found from the checkout root (CIBUILD_SOURCE_DIR)", () => {
|
|
58
|
-
const checkout = join(dir, "repo");
|
|
59
|
-
mkdirSync(join(checkout, "apps", "mobile"), { recursive: true });
|
|
60
|
-
copyFileSync(FIXTURE, join(checkout, "apps", "mobile", "gradle.properties"));
|
|
61
|
-
pin(dir, { JAVA_HOME: jdk, CIBUILD_SOURCE_DIR: checkout });
|
|
62
|
-
expect(readFileSync(join(checkout, "apps", "mobile", "gradle.properties"), "utf-8")).toContain(`org.gradle.java.home=${jdk}\n`);
|
|
63
|
-
});
|
|
64
|
-
test("a pinned JDK that is on this machine is left alone", () => {
|
|
65
|
-
const own = join(dir, "own-jdk");
|
|
66
|
-
mkdirSync(own);
|
|
67
|
-
writeFileSync(join(dir, "gradle.properties"), `org.gradle.java.home=${own}\n`);
|
|
68
|
-
expect(pin(dir, { JAVA_HOME: jdk })).toBe("");
|
|
69
|
-
expect(readFileSync(join(dir, "gradle.properties"), "utf-8")).toBe(`org.gradle.java.home=${own}\n`);
|
|
70
|
-
});
|
|
71
|
-
test("no pin, or no JDK of the build's own to name, changes nothing", () => {
|
|
72
|
-
writeFileSync(join(dir, "gradle.properties"), "org.gradle.jvmargs=-Xmx2g\n");
|
|
73
|
-
expect(pin(dir, { JAVA_HOME: jdk })).toBe("");
|
|
74
|
-
copyFileSync(FIXTURE, join(dir, "gradle.properties"));
|
|
75
|
-
expect(pin(dir, { JAVA_HOME: join(dir, "missing") })).toBe("");
|
|
76
|
-
expect(readFileSync(join(dir, "gradle.properties"), "utf-8")).toBe(readFileSync(FIXTURE, "utf-8"));
|
|
77
|
-
});
|
|
78
|
-
test("a commented-out pin is not a pin", () => {
|
|
79
|
-
writeFileSync(join(dir, "gradle.properties"), `#org.gradle.java.home=${PINNED}\n`);
|
|
80
|
-
expect(pin(dir, { JAVA_HOME: jdk })).toBe("");
|
|
81
|
-
expect(readFileSync(join(dir, "gradle.properties"), "utf-8")).toBe(`#org.gradle.java.home=${PINNED}\n`);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
describe("set-java-version", () => {
|
|
85
|
-
test("writes the build's JDK over a missing pin after choosing it", async () => {
|
|
86
|
-
const step = await new SetJavaVersionStepExecutor().execute({ java_version: "21" }, {}, testConfig);
|
|
87
|
-
const script = step.script ?? "";
|
|
88
|
-
expect(script).toContain("cibuild_gradle_java_home_pin");
|
|
89
|
-
expect(script.lastIndexOf("cibuild_gradle_java_home_pin")).toBeGreaterThan(script.indexOf("export JAVA_HOME"));
|
|
90
|
-
});
|
|
91
|
-
test("leaves a developer's own checkout alone on a local run", async () => {
|
|
92
|
-
const step = await new SetJavaVersionStepExecutor().execute({ java_version: "21" }, {}, { ...testConfig, local: true });
|
|
93
|
-
expect(step.script ?? "").not.toContain("cibuild_gradle_java_home_pin");
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=a-missing-pinned-jdk-yields-for-every-gradle-run.test.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Android signing step: sign-apk
|
|
3
|
-
*/
|
|
4
|
-
import { BaseStepExecutor } from './base.js';
|
|
5
|
-
import type { StepDef, CIConfig } from '../../types.js';
|
|
6
|
-
import type { ValidationRequirement, StepOutput } from '../validation-types.js';
|
|
7
|
-
export interface SignApkInputs {
|
|
8
|
-
/** Path(s) to APK or AAB file(s), pipe-separated */
|
|
9
|
-
android_app?: string;
|
|
10
|
-
/** Keystore file URL or local path (file://...) */
|
|
11
|
-
keystore_url?: string;
|
|
12
|
-
/** Keystore password */
|
|
13
|
-
keystore_password?: string;
|
|
14
|
-
/** Key alias inside the keystore */
|
|
15
|
-
keystore_alias?: string;
|
|
16
|
-
/** Private key password (defaults to keystore_password) */
|
|
17
|
-
private_key_password?: string;
|
|
18
|
-
/** Page alignment for .so files: automatic | true | false */
|
|
19
|
-
page_align?: string;
|
|
20
|
-
/** Signing tool: automatic | apksigner | jarsigner */
|
|
21
|
-
signer_tool?: string;
|
|
22
|
-
/** Output artifact name (without extension) */
|
|
23
|
-
output_name?: string;
|
|
24
|
-
/** Enable verbose logging */
|
|
25
|
-
verbose_log?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Signs APK/AAB files using apksigner or jarsigner with zipalign.
|
|
29
|
-
*/
|
|
30
|
-
export declare class SignApkStepExecutor extends BaseStepExecutor {
|
|
31
|
-
getValidationRequirements(inputs: SignApkInputs, env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
|
|
32
|
-
getOutputs(): StepOutput[];
|
|
33
|
-
execute(inputs: SignApkInputs, _env: Record<string, string>, _config: CIConfig): Promise<StepDef>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=android-sign.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android-sign.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/android-sign.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;IACvD,yBAAyB,CACvB,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAM1B,UAAU,IAAI,UAAU,EAAE;IAOpB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CA0IxG"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Android signing step: sign-apk
|
|
3
|
-
*/
|
|
4
|
-
import { BaseStepExecutor } from './base.js';
|
|
5
|
-
/**
|
|
6
|
-
* Signs APK/AAB files using apksigner or jarsigner with zipalign.
|
|
7
|
-
*/
|
|
8
|
-
export class SignApkStepExecutor extends BaseStepExecutor {
|
|
9
|
-
getValidationRequirements(inputs, env, _config) {
|
|
10
|
-
return [
|
|
11
|
-
this.requireCommand('zipalign', 'Android zipalign tool is required', 'Install Android SDK Build Tools'),
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
getOutputs() {
|
|
15
|
-
return [
|
|
16
|
-
{ name: 'CIBUILD_SIGNED_APK_PATH', type: 'environment', description: 'Path to the signed APK' },
|
|
17
|
-
{ name: 'CIBUILD_SIGNED_AAB_PATH', type: 'environment', description: 'Path to the signed AAB' },
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
async execute(inputs, _env, _config) {
|
|
21
|
-
const stepName = 'sign-apk';
|
|
22
|
-
const androidApp = this.getInput(inputs, 'android_app', '$CIBUILD_APK_PATH');
|
|
23
|
-
const keystoreUrl = this.getInput(inputs, 'keystore_url', '$KEYSTORE_URL');
|
|
24
|
-
const keystorePassword = this.getInput(inputs, 'keystore_password', '$KEYSTORE_PASSWORD');
|
|
25
|
-
const keystoreAlias = this.getInput(inputs, 'keystore_alias', '$KEYSTORE_ALIAS');
|
|
26
|
-
const privateKeyPassword = this.getInput(inputs, 'private_key_password', '');
|
|
27
|
-
const pageAlign = this.getInput(inputs, 'page_align', 'automatic');
|
|
28
|
-
const signerTool = this.getInput(inputs, 'signer_tool', 'automatic');
|
|
29
|
-
const outputName = this.getInput(inputs, 'output_name', '');
|
|
30
|
-
const verboseLog = this.getInput(inputs, 'verbose_log', false);
|
|
31
|
-
const commands = [];
|
|
32
|
-
commands.push('# sign-apk — sign Android APK/AAB');
|
|
33
|
-
commands.push('echo "🔐 Signing Android app..."');
|
|
34
|
-
commands.push('');
|
|
35
|
-
// Resolve keystore
|
|
36
|
-
commands.push('# Resolve keystore file');
|
|
37
|
-
commands.push(`KEYSTORE_URL="${keystoreUrl}"`);
|
|
38
|
-
commands.push(`KEYSTORE_PASSWORD="${keystorePassword}"`);
|
|
39
|
-
commands.push(`KEYSTORE_ALIAS="${keystoreAlias}"`);
|
|
40
|
-
if (privateKeyPassword) {
|
|
41
|
-
commands.push(`KEY_PASSWORD="${this.escapeBash(privateKeyPassword)}"`);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
commands.push('KEY_PASSWORD="$KEYSTORE_PASSWORD"');
|
|
45
|
-
}
|
|
46
|
-
commands.push('');
|
|
47
|
-
commands.push('if [ -z "$KEYSTORE_URL" ] || [ -z "$KEYSTORE_PASSWORD" ] || [ -z "$KEYSTORE_ALIAS" ]; then');
|
|
48
|
-
commands.push(' echo "❌ Error: keystore_url, keystore_password, and keystore_alias are required"');
|
|
49
|
-
commands.push(' exit 1');
|
|
50
|
-
commands.push('fi');
|
|
51
|
-
commands.push('');
|
|
52
|
-
// Download or resolve keystore
|
|
53
|
-
commands.push('# Download or resolve keystore file');
|
|
54
|
-
commands.push('if [[ "$KEYSTORE_URL" == file://* ]]; then');
|
|
55
|
-
commands.push(' KEYSTORE_PATH="${KEYSTORE_URL#file://}"');
|
|
56
|
-
commands.push('elif [[ "$KEYSTORE_URL" == http* ]]; then');
|
|
57
|
-
commands.push(' KEYSTORE_PATH="$(mktemp -t keystore).jks"');
|
|
58
|
-
commands.push(' curl -sSfL "$KEYSTORE_URL" -o "$KEYSTORE_PATH"');
|
|
59
|
-
commands.push('else');
|
|
60
|
-
commands.push(' KEYSTORE_PATH="$KEYSTORE_URL"');
|
|
61
|
-
commands.push('fi');
|
|
62
|
-
commands.push('');
|
|
63
|
-
commands.push('if [ ! -f "$KEYSTORE_PATH" ]; then');
|
|
64
|
-
commands.push(' echo "❌ Error: Keystore file not found: $KEYSTORE_PATH"');
|
|
65
|
-
commands.push(' exit 1');
|
|
66
|
-
commands.push('fi');
|
|
67
|
-
commands.push('');
|
|
68
|
-
// Determine signer tool
|
|
69
|
-
commands.push('# Determine signing tool');
|
|
70
|
-
if (signerTool === 'automatic') {
|
|
71
|
-
commands.push('if command -v apksigner &>/dev/null; then');
|
|
72
|
-
commands.push(' SIGNER="apksigner"');
|
|
73
|
-
commands.push('elif command -v jarsigner &>/dev/null; then');
|
|
74
|
-
commands.push(' SIGNER="jarsigner"');
|
|
75
|
-
commands.push('else');
|
|
76
|
-
commands.push(' echo "❌ Error: Neither apksigner nor jarsigner found"');
|
|
77
|
-
commands.push(' exit 1');
|
|
78
|
-
commands.push('fi');
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
commands.push(`SIGNER="${this.escapeBash(signerTool)}"`);
|
|
82
|
-
}
|
|
83
|
-
commands.push('echo "Using signer: $SIGNER"');
|
|
84
|
-
commands.push('');
|
|
85
|
-
// Process each app file
|
|
86
|
-
commands.push(`ANDROID_APP="${androidApp}"`);
|
|
87
|
-
commands.push('SIGNED_APK_PATH=""');
|
|
88
|
-
commands.push('SIGNED_AAB_PATH=""');
|
|
89
|
-
commands.push('');
|
|
90
|
-
commands.push('IFS="|" read -ra APP_FILES <<< "$ANDROID_APP"');
|
|
91
|
-
commands.push('for APP_FILE in "${APP_FILES[@]}"; do');
|
|
92
|
-
commands.push(' APP_FILE="$(echo "$APP_FILE" | xargs)" # trim whitespace');
|
|
93
|
-
commands.push(' [ -z "$APP_FILE" ] && continue');
|
|
94
|
-
commands.push(' ');
|
|
95
|
-
commands.push(' if [ ! -f "$APP_FILE" ]; then');
|
|
96
|
-
commands.push(' echo "⚠️ File not found: $APP_FILE — skipping"');
|
|
97
|
-
commands.push(' continue');
|
|
98
|
-
commands.push(' fi');
|
|
99
|
-
commands.push(' ');
|
|
100
|
-
commands.push(' EXT="${APP_FILE##*.}"');
|
|
101
|
-
commands.push(' DIR="$(dirname "$APP_FILE")"');
|
|
102
|
-
commands.push(' BASE="$(basename "$APP_FILE" ".$EXT")"');
|
|
103
|
-
if (outputName) {
|
|
104
|
-
commands.push(` OUT_NAME="${this.escapeBash(outputName)}"`);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
commands.push(' OUT_NAME="${BASE}-signed"');
|
|
108
|
-
}
|
|
109
|
-
commands.push(' SIGNED_FILE="$DIR/${OUT_NAME}.${EXT}"');
|
|
110
|
-
commands.push(' ');
|
|
111
|
-
// zipalign for APKs
|
|
112
|
-
commands.push(' if [ "$EXT" = "apk" ]; then');
|
|
113
|
-
commands.push(' echo "Zipaligning: $APP_FILE"');
|
|
114
|
-
const alignFlag = pageAlign === 'true' ? '-p' : '';
|
|
115
|
-
commands.push(` zipalign ${alignFlag} -f 4 "$APP_FILE" "$DIR/\${BASE}-aligned.apk"`);
|
|
116
|
-
commands.push(' APP_FILE="$DIR/${BASE}-aligned.apk"');
|
|
117
|
-
commands.push(' fi');
|
|
118
|
-
commands.push(' ');
|
|
119
|
-
// Sign
|
|
120
|
-
commands.push(' echo "Signing: $APP_FILE → $SIGNED_FILE"');
|
|
121
|
-
commands.push(' if [ "$SIGNER" = "apksigner" ]; then');
|
|
122
|
-
const verboseFlag = verboseLog ? ' --verbose' : '';
|
|
123
|
-
commands.push(` apksigner sign${verboseFlag} --ks "$KEYSTORE_PATH" --ks-pass "pass:$KEYSTORE_PASSWORD" --ks-key-alias "$KEYSTORE_ALIAS" --key-pass "pass:$KEY_PASSWORD" --out "$SIGNED_FILE" "$APP_FILE"`);
|
|
124
|
-
commands.push(' else');
|
|
125
|
-
commands.push(' cp "$APP_FILE" "$SIGNED_FILE"');
|
|
126
|
-
commands.push(` jarsigner${verboseLog ? ' -verbose' : ''} -keystore "$KEYSTORE_PATH" -storepass "$KEYSTORE_PASSWORD" -keypass "$KEY_PASSWORD" "$SIGNED_FILE" "$KEYSTORE_ALIAS"`);
|
|
127
|
-
commands.push(' fi');
|
|
128
|
-
commands.push(' ');
|
|
129
|
-
// Track outputs
|
|
130
|
-
commands.push(' if [ "$EXT" = "apk" ]; then');
|
|
131
|
-
commands.push(' SIGNED_APK_PATH="$SIGNED_FILE"');
|
|
132
|
-
commands.push(' elif [ "$EXT" = "aab" ]; then');
|
|
133
|
-
commands.push(' SIGNED_AAB_PATH="$SIGNED_FILE"');
|
|
134
|
-
commands.push(' fi');
|
|
135
|
-
commands.push(' echo "✅ Signed: $SIGNED_FILE"');
|
|
136
|
-
commands.push('done');
|
|
137
|
-
commands.push('');
|
|
138
|
-
// Export
|
|
139
|
-
commands.push('# Export signed paths');
|
|
140
|
-
commands.push('[ -n "$SIGNED_APK_PATH" ] && envman add --key CIBUILD_SIGNED_APK_PATH --value "$SIGNED_APK_PATH"');
|
|
141
|
-
commands.push('[ -n "$SIGNED_AAB_PATH" ] && envman add --key CIBUILD_SIGNED_AAB_PATH --value "$SIGNED_AAB_PATH"');
|
|
142
|
-
commands.push('echo "✅ Signing complete"');
|
|
143
|
-
const script = this.createBashScriptFromCommands(commands, stepName);
|
|
144
|
-
return this.createScriptStep(script, stepName);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=android-sign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android-variant-resolution.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/android-variant-resolution.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* When the pipeline's variant is a guess Gradle cannot resolve.
|
|
3
|
-
*
|
|
4
|
-
* `android/nowinandroid` declares its product flavors as an enum in
|
|
5
|
-
* `build-logic/convention/…/NiaFlavor.kt` and applies them through a
|
|
6
|
-
* convention plugin, so `app/build.gradle.kts` has no `productFlavors {}`
|
|
7
|
-
* block. The literal scan saw no flavors, `VARIANT` stayed `debug`, and
|
|
8
|
-
* Gradle refused the very first Android step of the thirty-app study.
|
|
9
|
-
*
|
|
10
|
-
* Convention plugins are the norm in modern Android, so "literal or nothing"
|
|
11
|
-
* will keep missing them. Gradle names the candidates in its own error; this
|
|
12
|
-
* reads them back.
|
|
13
|
-
*
|
|
14
|
-
* The function under test is the one that ships — the shell is executed here,
|
|
15
|
-
* not re-implemented.
|
|
16
|
-
*/
|
|
17
|
-
import { execFileSync } from "node:child_process";
|
|
18
|
-
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
19
|
-
import { tmpdir } from "node:os";
|
|
20
|
-
import { join } from "node:path";
|
|
21
|
-
import { AndroidBuildForUITestingStepExecutor, AndroidLintStepExecutor, AndroidUnitTestStepExecutor, GradleBuildStepExecutor, PICK_VARIANT_TASK_FUNCTION, gradleProjectDir, gradleTaskPath, variantTaskCommands, } from "./android.js";
|
|
22
|
-
import { testConfig } from "./test-config.js";
|
|
23
|
-
/** Run the shipped shell function over some Gradle output. */
|
|
24
|
-
function pick(gradleOutput, prefix, suffix, buildType) {
|
|
25
|
-
const script = `${PICK_VARIANT_TASK_FUNCTION}\ncibuild_pick_variant_task "${prefix}" "${suffix}" "${buildType}"`;
|
|
26
|
-
return execFileSync("bash", ["-c", script], {
|
|
27
|
-
input: gradleOutput,
|
|
28
|
-
encoding: "utf-8",
|
|
29
|
-
}).trim();
|
|
30
|
-
}
|
|
31
|
-
/** The error nowinandroid produced, verbatim. */
|
|
32
|
-
const NOW_IN_ANDROID = `
|
|
33
|
-
FAILURE: Build failed with an exception.
|
|
34
|
-
|
|
35
|
-
* What went wrong:
|
|
36
|
-
Cannot locate tasks that match ':app:lintDebug' as task 'lintDebug' is ambiguous in project ':app'. Candidates are: 'lintDemoDebug', 'lintDemoRelease', 'lintProdDebug', 'lintProdRelease'.
|
|
37
|
-
|
|
38
|
-
* Try:
|
|
39
|
-
> Run gradlew tasks to get a list of available tasks.
|
|
40
|
-
`;
|
|
41
|
-
describe("cibuild_pick_variant_task", () => {
|
|
42
|
-
test("reads the candidates out of the nowinandroid error", () => {
|
|
43
|
-
expect(pick(NOW_IN_ANDROID, "lint", "", "Debug")).toBe("lintDemoDebug");
|
|
44
|
-
});
|
|
45
|
-
// The order Gradle happens to list them in is not a ranking, but a debug
|
|
46
|
-
// candidate must win over a release one wherever it appears.
|
|
47
|
-
test("prefers a debug candidate whatever order they are listed in", () => {
|
|
48
|
-
const reordered = NOW_IN_ANDROID.replace("'lintDemoDebug', 'lintDemoRelease', 'lintProdDebug', 'lintProdRelease'", "'lintProdRelease', 'lintDemoRelease', 'lintProdDebug', 'lintDemoDebug'");
|
|
49
|
-
expect(pick(reordered, "lint", "", "Debug")).toBe("lintProdDebug");
|
|
50
|
-
});
|
|
51
|
-
test("reads a unit-test task, suffix and all", () => {
|
|
52
|
-
const output = "task 'testDebugUnitTest' is ambiguous in project ':app'. Candidates are: " +
|
|
53
|
-
"'testDemoDebugUnitTest', 'testProdDebugUnitTest', 'testDemoReleaseUnitTest'.";
|
|
54
|
-
expect(pick(output, "test", "UnitTest", "Debug")).toBe("testDemoDebugUnitTest");
|
|
55
|
-
});
|
|
56
|
-
test("honours a build type that is not Debug", () => {
|
|
57
|
-
expect(pick(NOW_IN_ANDROID, "lint", "", "Release")).toBe("lintDemoRelease");
|
|
58
|
-
});
|
|
59
|
-
// Retrying with a task that builds the wrong thing is worse than failing
|
|
60
|
-
// with the error the user can read.
|
|
61
|
-
test("says nothing when no candidate matches the build type", () => {
|
|
62
|
-
const output = "task 'lintDebug' is ambiguous in project ':app'. Candidates are: " +
|
|
63
|
-
"'lintProdRelease', 'lintStagingRelease'.";
|
|
64
|
-
expect(pick(output, "lint", "", "Debug")).toBe("");
|
|
65
|
-
});
|
|
66
|
-
test("says nothing when the failure is not an ambiguity", () => {
|
|
67
|
-
expect(pick("FAILURE: Could not resolve all dependencies.", "lint", "", "Debug")).toBe("");
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe("the step that uses it", () => {
|
|
71
|
-
const escape = (value) => value;
|
|
72
|
-
test("runs the composed task first, and only resolves if Gradle refuses it", () => {
|
|
73
|
-
const script = variantTaskCommands({
|
|
74
|
-
module: "app",
|
|
75
|
-
variant: "debug",
|
|
76
|
-
prefix: "lint",
|
|
77
|
-
suffix: "",
|
|
78
|
-
escape,
|
|
79
|
-
}).join("\n");
|
|
80
|
-
expect(script).toContain("$GRADLE_CMD :app:lintDebug");
|
|
81
|
-
expect(script).toContain("is ambiguous in project");
|
|
82
|
-
// A flavourless project pays for nothing: the retry is inside the branch.
|
|
83
|
-
expect(script.indexOf("cibuild_pick_variant_task \"lint\"")).toBeGreaterThan(script.indexOf("$GRADLE_CMD :app:lintDebug"));
|
|
84
|
-
});
|
|
85
|
-
// Whichever of lint and unit tests runs first pays for the discovery; the
|
|
86
|
-
// other reads VARIANT out of the envstore.
|
|
87
|
-
test("exports the variant it resolved", () => {
|
|
88
|
-
const script = variantTaskCommands({
|
|
89
|
-
module: "app",
|
|
90
|
-
variant: "debug",
|
|
91
|
-
prefix: "test",
|
|
92
|
-
suffix: "UnitTest",
|
|
93
|
-
escape,
|
|
94
|
-
}).join("\n");
|
|
95
|
-
expect(script).toContain("envman add --key VARIANT");
|
|
96
|
-
expect(script).toContain("$GRADLE_CMD :app:$RESOLVED_TASK");
|
|
97
|
-
});
|
|
98
|
-
test("keeps a test filter on both the first attempt and the retry", () => {
|
|
99
|
-
const script = variantTaskCommands({
|
|
100
|
-
module: "app",
|
|
101
|
-
variant: "debug",
|
|
102
|
-
prefix: "test",
|
|
103
|
-
suffix: "UnitTest",
|
|
104
|
-
gradleArgs: "--tests 'com.acme.*'",
|
|
105
|
-
escape,
|
|
106
|
-
}).join("\n");
|
|
107
|
-
const withFilter = script.split("\n").filter((l) => l.includes("--tests 'com.acme.*'"));
|
|
108
|
-
expect(withFilter).toHaveLength(2);
|
|
109
|
-
});
|
|
110
|
-
test("propagates a failure that is not an ambiguity", () => {
|
|
111
|
-
const script = variantTaskCommands({
|
|
112
|
-
module: "app",
|
|
113
|
-
variant: "debug",
|
|
114
|
-
prefix: "lint",
|
|
115
|
-
suffix: "",
|
|
116
|
-
escape,
|
|
117
|
-
}).join("\n");
|
|
118
|
-
expect(script).toContain('exit "$VARIANT_STATUS"');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
/**
|
|
122
|
-
* An app whose root project is the application: no `include`, the Android
|
|
123
|
-
* application plugin applied in the root build file, sources in `src/`.
|
|
124
|
-
* Gradle's path for that project is `:`, so a pipeline says `module: ":"`.
|
|
125
|
-
*/
|
|
126
|
-
describe("a module that names the root project", () => {
|
|
127
|
-
const escape = (value) => value;
|
|
128
|
-
test("runs the root project's own task, with no empty module segment", () => {
|
|
129
|
-
const script = variantTaskCommands({
|
|
130
|
-
module: ":",
|
|
131
|
-
variant: "debug",
|
|
132
|
-
prefix: "test",
|
|
133
|
-
suffix: "UnitTest",
|
|
134
|
-
escape,
|
|
135
|
-
}).join("\n");
|
|
136
|
-
expect(script).toContain("$GRADLE_CMD :testDebugUnitTest");
|
|
137
|
-
expect(script).not.toContain("::");
|
|
138
|
-
});
|
|
139
|
-
test("retries the resolved task on the root project too", () => {
|
|
140
|
-
const script = variantTaskCommands({
|
|
141
|
-
module: ":",
|
|
142
|
-
variant: "debug",
|
|
143
|
-
prefix: "lint",
|
|
144
|
-
suffix: "",
|
|
145
|
-
escape,
|
|
146
|
-
}).join("\n");
|
|
147
|
-
expect(script).toContain("$GRADLE_CMD :lintDebug");
|
|
148
|
-
expect(script).toContain("$GRADLE_CMD :$RESOLVED_TASK");
|
|
149
|
-
expect(script).toContain('echo "Using :$RESOLVED_TASK');
|
|
150
|
-
expect(script).not.toContain("::");
|
|
151
|
-
});
|
|
152
|
-
// An explicit empty string reaches the step as is; it must not become
|
|
153
|
-
// `::testDebugUnitTest`.
|
|
154
|
-
test("treats an empty module as the root", () => {
|
|
155
|
-
const script = variantTaskCommands({
|
|
156
|
-
module: "",
|
|
157
|
-
variant: "debug",
|
|
158
|
-
prefix: "test",
|
|
159
|
-
suffix: "UnitTest",
|
|
160
|
-
escape,
|
|
161
|
-
}).join("\n");
|
|
162
|
-
expect(script).toContain("$GRADLE_CMD :testDebugUnitTest");
|
|
163
|
-
expect(script).not.toContain("::");
|
|
164
|
-
});
|
|
165
|
-
test("leaves a named module exactly as it was", () => {
|
|
166
|
-
const options = { variant: "debug", prefix: "test", suffix: "UnitTest", escape };
|
|
167
|
-
const script = variantTaskCommands({ module: "app", ...options }).join("\n");
|
|
168
|
-
expect(script).toContain("$GRADLE_CMD :app:testDebugUnitTest 2>&1");
|
|
169
|
-
expect(script).toContain(" echo \"Using :app:$RESOLVED_TASK — resolved VARIANT=$RESOLVED_VARIANT\"");
|
|
170
|
-
expect(script).toContain(" $GRADLE_CMD :app:$RESOLVED_TASK");
|
|
171
|
-
});
|
|
172
|
-
test("keeps a nested module's path", () => {
|
|
173
|
-
const script = variantTaskCommands({
|
|
174
|
-
module: "feature:store",
|
|
175
|
-
variant: "debug",
|
|
176
|
-
prefix: "lint",
|
|
177
|
-
suffix: "",
|
|
178
|
-
escape,
|
|
179
|
-
}).join("\n");
|
|
180
|
-
expect(script).toContain("$GRADLE_CMD :feature:store:lintDebug");
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
describe("gradleTaskPath and gradleProjectDir", () => {
|
|
184
|
-
test("compose a task path", () => {
|
|
185
|
-
expect(gradleTaskPath(":", "lintDebug")).toBe(":lintDebug");
|
|
186
|
-
expect(gradleTaskPath("", "lintDebug")).toBe(":lintDebug");
|
|
187
|
-
expect(gradleTaskPath("app", "lintDebug")).toBe(":app:lintDebug");
|
|
188
|
-
});
|
|
189
|
-
test("compose the project directory, empty for the root", () => {
|
|
190
|
-
expect(gradleProjectDir(":")).toBe("");
|
|
191
|
-
expect(gradleProjectDir("")).toBe("");
|
|
192
|
-
expect(gradleProjectDir("app")).toBe("app/");
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
describe("the steps, for the root project", () => {
|
|
196
|
-
test("lint runs :lintDebug and reports under build/", async () => {
|
|
197
|
-
const result = await new AndroidLintStepExecutor().execute({ module: ":" }, {}, testConfig);
|
|
198
|
-
const script = result.script;
|
|
199
|
-
expect(script).toContain("$GRADLE_CMD :lintDebug");
|
|
200
|
-
expect(script).not.toContain("::");
|
|
201
|
-
expect(script).toContain('echo "Lint report location: build/reports/lint-results-debug.html"');
|
|
202
|
-
expect(script).toContain('echo "Running lint on the root project"');
|
|
203
|
-
});
|
|
204
|
-
test("unit tests run :testDebugUnitTest and report under build/", async () => {
|
|
205
|
-
const result = await new AndroidUnitTestStepExecutor().execute({ module: ":" }, {}, testConfig);
|
|
206
|
-
const script = result.script;
|
|
207
|
-
expect(script).toContain("$GRADLE_CMD :testDebugUnitTest");
|
|
208
|
-
expect(script).not.toContain("::");
|
|
209
|
-
expect(script).toContain('echo "Test report location: build/reports/tests/testDebugUnitTest/index.html"');
|
|
210
|
-
});
|
|
211
|
-
test("an absent module still means app", async () => {
|
|
212
|
-
const lint = await new AndroidLintStepExecutor().execute({}, {}, testConfig);
|
|
213
|
-
const unit = await new AndroidUnitTestStepExecutor().execute({}, {}, testConfig);
|
|
214
|
-
expect(lint.script).toContain("$GRADLE_CMD :app:lintDebug");
|
|
215
|
-
expect(lint.script).toContain('echo "Running lint on module: app"');
|
|
216
|
-
expect(unit.script).toContain('echo "Running unit tests on module: app"');
|
|
217
|
-
expect(lint.script).toContain('echo "Lint report location: app/build/reports/lint-results-debug.html"');
|
|
218
|
-
expect(unit.script).toContain("$GRADLE_CMD :app:testDebugUnitTest");
|
|
219
|
-
});
|
|
220
|
-
test("UI testing assembles on the root and finds its APKs", async () => {
|
|
221
|
-
const result = await new AndroidBuildForUITestingStepExecutor().execute({ module: ":" }, {}, testConfig);
|
|
222
|
-
const script = result.script;
|
|
223
|
-
expect(script).toContain("$GRADLE_CMD :assembleDebug :assembleDebugAndroidTest");
|
|
224
|
-
expect(script).not.toContain("::");
|
|
225
|
-
const find = script.split("\n").find((l) => l.startsWith("APP_APK="));
|
|
226
|
-
const pattern = find.match(/-path "([^"]+)"/)[1];
|
|
227
|
-
const dir = mkdtempSync(join(tmpdir(), "cibuild-root-apk-"));
|
|
228
|
-
try {
|
|
229
|
-
mkdirSync(join(dir, "build/outputs/apk/debug"), { recursive: true });
|
|
230
|
-
writeFileSync(join(dir, "build/outputs/apk/debug/x.apk"), "");
|
|
231
|
-
const found = execFileSync("find", [".", "-path", pattern], { cwd: dir, encoding: "utf-8" }).trim();
|
|
232
|
-
expect(found).toBe("./build/outputs/apk/debug/x.apk");
|
|
233
|
-
}
|
|
234
|
-
finally {
|
|
235
|
-
rmSync(dir, { recursive: true, force: true });
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
/**
|
|
240
|
-
* gradle-build takes a bare `assembleDebug`, which a root project satisfies.
|
|
241
|
-
* Its artifact collection must still see `./build/outputs/...`.
|
|
242
|
-
*/
|
|
243
|
-
describe("gradle-build's artifact collection", () => {
|
|
244
|
-
test("finds an APK the root project wrote", async () => {
|
|
245
|
-
const result = await new GradleBuildStepExecutor().execute({}, {}, testConfig);
|
|
246
|
-
const script = result.script;
|
|
247
|
-
const pattern = script.match(/-path "(\*\/build\/outputs\/apk\/[^"]+)"/)[1];
|
|
248
|
-
const dir = mkdtempSync(join(tmpdir(), "cibuild-root-apk-"));
|
|
249
|
-
try {
|
|
250
|
-
mkdirSync(join(dir, "build/outputs/apk/debug"), { recursive: true });
|
|
251
|
-
writeFileSync(join(dir, "build/outputs/apk/debug/x.apk"), "");
|
|
252
|
-
const found = execFileSync("find", [".", "-path", pattern], { cwd: dir, encoding: "utf-8" }).trim();
|
|
253
|
-
expect(found).toBe("./build/outputs/apk/debug/x.apk");
|
|
254
|
-
}
|
|
255
|
-
finally {
|
|
256
|
-
rmSync(dir, { recursive: true, force: true });
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
//# sourceMappingURL=android-variant-resolution.test.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Android version code and version name step implementation
|
|
3
|
-
* Updates versionCode and versionName in build.gradle
|
|
4
|
-
*/
|
|
5
|
-
import { BaseStepExecutor } from './base.js';
|
|
6
|
-
import type { StepDef, CIConfig } from '../../types.js';
|
|
7
|
-
import type { ValidationRequirement, StepOutput } from '../validation-types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Inputs for change-android-versioncode-and-versionname step
|
|
10
|
-
*/
|
|
11
|
-
export interface ChangeAndroidVersionInputs {
|
|
12
|
-
build_gradle_path?: string;
|
|
13
|
-
new_version_name?: string;
|
|
14
|
-
new_version_code?: string;
|
|
15
|
-
version_code_offset?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Change Android versionCode and versionName step executor
|
|
19
|
-
* Modifies build.gradle in-place using sed before the build runs
|
|
20
|
-
*/
|
|
21
|
-
export declare class ChangeAndroidVersionStepExecutor extends BaseStepExecutor {
|
|
22
|
-
getOutputs(): StepOutput[];
|
|
23
|
-
getValidationRequirements(inputs: ChangeAndroidVersionInputs, _env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
|
|
24
|
-
execute(inputs: ChangeAndroidVersionInputs, _env: Record<string, string>, _config: CIConfig): Promise<StepDef>;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=android-version.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android-version.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/android-version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,gCAAiC,SAAQ,gBAAgB;IACpE,UAAU,IAAI,UAAU,EAAE;IAO1B,yBAAyB,CACvB,MAAM,EAAE,0BAA0B,EAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAMpB,OAAO,CAAC,MAAM,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CAoHrH"}
|