-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add webshell commands to wrap web apps in Android WebView shells #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'solana-mobile': minor | ||
| --- | ||
|
|
||
| Add `webshell init` and `webshell build`: generate and build an Android WebView wrapper around an existing web app or PWA (ports @solana-mobile/webshell-cli into this CLI). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| *.bat text eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Webshell | ||
|
|
||
| concurrency: | ||
| cancel-in-progress: true | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/webshell.yml | ||
| - src/webshell/** | ||
| - templates/webshell-android/** | ||
|
|
||
| # Gradle resolves the template's dependencies from live repositories, which can break with no | ||
| # pull request attached, so exercise the full build on a schedule too. | ||
| schedule: | ||
| - cron: "0 6 * * *" | ||
|
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-apk: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| env: | ||
| # CI-only throwaway values: the keystore is generated fresh and discarded with the runner. | ||
| SOLANA_MOBILE_KEYSTORE_PASSWORD: ci-password | ||
| SOLANA_MOBILE_KEY_PASSWORD: ci-password | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Environment | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "17" | ||
|
|
||
| - name: Install Android packages | ||
| run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" 'platforms;android-37.0' 'build-tools;37.0.0' | ||
|
|
||
| - name: Build the CLI | ||
| run: bun run build | ||
|
|
||
| # Everything generated lands in $RUNNER_TEMP so the setup action's dirty-repo check stays | ||
| # meaningful. Fully flagged, so the init must complete without a single prompt. | ||
| - name: Generate a project | ||
| run: > | ||
| node dist/cli.mjs webshell init "$RUNNER_TEMP/smoke" | ||
| --app-name Smoke | ||
| --application-id com.example.smoke | ||
| --keystore-alias smoke | ||
| --keystore-path "$RUNNER_TEMP/smoke.keystore" | ||
| --skip-version-check | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| --url https://example.com | ||
| --version-code 1 | ||
| --version-name 1.0 | ||
|
|
||
| - name: Build the APK | ||
| run: node dist/cli.mjs webshell build "$RUNNER_TEMP/smoke" --stacktrace --skip-version-check | ||
|
|
||
| # The keystore and alias are configured, so the build signs and reports this exact path. | ||
| - name: Assert the release APK exists | ||
| run: test -f "$RUNNER_TEMP/smoke/app/build/outputs/apk/release/app-release.apk" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.