This repository hosts the Skip command-line tool "skip", which is distributed as a binary plug-in through the public repo at https://github.com/skiptools/skip/releases as well as the Homebrew Cask via https://github.com/skiptools/homebrew-skip/blob/main/Casks/skip.rb.
The exact same binary is used by both the Xcode/SwiftPM skipstone build plugin
as well as the command-line tool installed via Homebrew's brew install skiptools/skip/skip
Note
This repository, https://github.com/skiptools/skipstone.git, vends the skip tool,
whereas the https://github.com/skiptools/skip.git repository vends the skipstone plugin.
The names are the reverse of what you might expect.
The skip tool itself is a stand-alone cross-platform command-line executable that
contains a plethora of commands that support the
creation of Skip projects, the transpilation and bridge-building
that facilitate bi-directional communication between Swift and Kotlin on Android,
transformers from SwiftPM projects into Gradle projects,
resource converters for .xcassets and .xcstrings bundles to turn them
into Android assets, a front-end for the Swift SDK for Android, Gradle,
and the Android emulator, and much more.
The skip CLI is installed using Homebrew. Skip is distributed as a binary Homebrew "Cask" for macOS, Linux, and Windows (with WSL 2). For complete details, see the Getting Started Guide.
Once Homebrew is set up, Skip can be installed (and updated) by running the Terminal command:
% brew install skiptools/skip/skip
==> Tapping skiptools/skip
Cloning into '/opt/homebrew/Library/Taps/skiptools/homebrew-skip'...
Tapped 1 cask (15 files, 417KB).
==> Downloading https://source.skip.dev/skip/releases/download/1.0.0/skip.zip
==> Installing dependencies: android-platform-tools
==> Downloading https://dl.google.com/android/repository/platform-tools_r34.0.5-darwin.zip
==> Installing Cask android-platform-tools
==> Linking Binary 'adb' to '/opt/homebrew/bin/adb'
πΊ android-platform-tools was successfully installed!
==> Installing Cask skip
==> Linking Binary 'skip' to '/opt/homebrew/bin/skip'
βββββββ βββ βββ ββ βββββββ
β ββ β β ββ ββ β
β βββββββ βββ ββ ββ β β
β ββββββββ βββ ββ βββ β
ββββββ ββ ββββ ββ ββββ
ββββββ ββ β ββ ββ β
ββββββββββββββ ββββββββββββ
Welcome to Skip 1.7.0!
Run "skip checkup" to perform a full system evaluation.
Run "skip create" to start a new project.
Visit https://skip.dev for documentation, samples, and FAQs.
Happy Skipping!
πΊ skip was successfully installed!This will download and install the skip tool itself, as well as the gradle and Android SDK dependencies that are necessary for building and testing the Kotlin/Android side of your apps.
Note
The skip tool installed via Homebrew is the exact same binary that is used by the Skip Xcode plugin, but they are installed in separate locations and updated through different mechanisms (the Homebrew Cask for the CLI and the skip/Package.swift for the SwiftPM plugin).
Caution
Linux and Windows support is preliminary and currently doesn't support many features, but it can be used for creating, building, testing, and exporting framework projects as well as running the skip android frontend for the Swift SDK for Android. For creating and building full app projects, macOS is required.
skip upgrade: Upgrade to the latest Skip versionskip checkup: Run tests to ensure Skip is in working orderskip create: Create a new Skip project interactivelyskip init: Initialize a new Skip projectskip doctor: Evaluate and diagnose Skip development environmentskip verify: Verify Skip projectskip export: Export the Gradle project and built artifactsskip test: Run parity tests and generate reportsskip icon: Create and manage app iconsskip devices: List connected devices and emulators/simulatorsskip android: Perform a native Android package commandskip android build: Build the native project for Androidskip android test: Test the native project on an Android device or emulatorskip android emulator create: Install and create an Android emulator imageskip android emulator list: List installed Android emulatorsskip android emulator launch: Launch an Android emulatorskip android sdk list: List the installed Swift Android SDKs
In order to iterate on local changes to the skipstone binary that the Skip plugin uses,
create an Xcode workspace that includes a local checkout of
skipstone.git
and
skip.git
(or forks of those repositories),
along with any Skip apps or frameworks where you want to test the changes.
The key is that the current working directory for Xcode must be the skipstone folder.
This is the magic property that tells the Skip plugin to use the locally-built skip binary
rather than the remote binary that is referenced by the plugins specification in Package.skip.
In order to open Xcode from the skipstone folder, it must be done from the Terminal,
like so:
cd skipstone/
open /path/to/my/project.xcworkspaceIf you are successfully using the local Skip build for your plugin, this will be
indicated in the Xcode Build log in the Report Navigator tab. E.g., when launching a Skip app,
expanding the Run skip gradle messages will reference the local build of skip,
like so:
Showing All Messages
running gradle build with: /Users/marc/Library/Developer/Xcode/DerivedData/Skip-Everything-aqywrhrzhkbvfseiqgxuufbdwdft/Build/Products/Debug/skip gradle -p /opt/src/github/skiptools/skipapp-godot-demo/Darwin/../Android launchDebugFor framework projects (e.g., when building or running tests), the indication that it is using the local build will come from the plugin log message for the target. The indication that it is a local debug build will be that there is an asterisk ("*") after the Skip version number at the beginning of the skipstone plugin output, like so:
Showing All Messages
Skip 1.7.0*: skipstone plugin to: /Users/marc/Library/Developer/Xcode/DerivedData/Skip-Everything-aqywrhrzhkbvfseiqgxuufbdwdft/Build/Intermediates.noindex/BuildToolPluginIntermediates/skip-lib.output/SkipLib/skipstone/SkipLib/src/main at 11:23:18Caution
If Xcode ever crashes (heaven forfend) and automatically re-starts, it will not restart from the skipstone folder, which means that suddenly you will no longer be building against your local skipstone changes. This can be very confusing.
Similarly, launching Xcode from the dock and using Open Recent⦠to open the project also will not happen from the skipstone directory.
When in doubt, always just quit Xcode manually and re-launch your workspace from the skipstone folder from the Terminal again, and then verify that the local build of skipstone is being used with the logging indicators above.
Creating a release of skipstone is done with the
scripts/release_skip.sh
script, which requires that each of these three repositories
are checked out in peer folders:
- https://github.com/skiptools/skipstone.git
- https://github.com/skiptools/skip.git
- https://github.com/skiptools/homebrew-skip.git
Note
You must have write and release permissions for each of these repositories in order to be able to create a release.
The release script will build the tool for both macOS and cross-compile it for Linux. So you will need the swiftly tool installed as well as the static Linux SDK.
Tip
To do a dry run of a release without trying to push or tag any changes, run DRY_RUN=1 ./scripts/release_skip.sh
The release script will do the following:
- Bump the
skipVersioninSources/SkipSyntax/Version.swift. By default this will bump the patch version, but runningSEMVER_BUMP='minor' ./scripts/release_skip.shwill instead bump the minor version. - Build the universal macOS artifactbundle
skip-macos.zipwithscripts/build_macos_plugin.sh - Build the static Linux (MUSL) artifactbundle
skip-linux.zipwithscripts/build_linux_plugin.sh - Update the bundle URLs and checksums in the Skip plugin's
Package.swift - Update the binary URLs and checksums for the Homebrew Cask's
skip.rb - Commit, tag, and push each of
skipstone.git,skip.git, andhomebrew-skip.git - Create GitHub releases for each of
skipstone.gitandskip.git - Upgrade Skip on the local machine with
brew upgrade skiptools/skip/skip - Run
skip welcome
As a post-release step, it is a good idea to make sure that skip checkup --native works on the local machine.
Contributions are welcome! Fork the repository and make local changes,
and ensure that all the test cases pass (either via Xcode or with swift test from the Terminal).
The Contributor License Agreement (CLA) can be signed
by adding your GitHub username in the
clabot-config
before submitting pull requests.
It is wise to discuss any major intended changes on the discussions board before embarking on any big projects.
Distributed under the GNU Affero General Public License v3.0 License.
See LICENSE.txt for more information.