Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ef2aca7
Add compileSdkExtension to Android targets
igordmn Sep 16, 2026
23914ce
Add compileSdkExtension to Android test projects
igordmn Sep 16, 2026
ed818e6
Rename compileSdkExtension to compileSdkMinor
igordmn Sep 16, 2026
b18a481
Update compileSdk syntax to use release DSL format
igordmn Sep 16, 2026
bad444b
Update compileSdk to use release API with minor level
igordmn Sep 16, 2026
92f5e11
Add GitHub workflow for validating examples
igordmn Sep 16, 2026
2ad440e
Add Kotlin version input validation to examples workflow
igordmn Sep 16, 2026
60814b5
Replace env vars with inline inputs in workflows
igordmn Sep 16, 2026
0311619
Remove version override inputs from examples workflow
igordmn Sep 16, 2026
06076c4
Add composite actions for setup prerequisites and Xcode
igordmn Sep 16, 2026
0570369
Fix Android API version and handle empty version args
igordmn Sep 16, 2026
b68c208
Update Android API version to 37.1 with channel 3
igordmn Sep 16, 2026
a3ea240
Enable KVM for Android emulator in CI workflow
igordmn Sep 16, 2026
662bc50
Extract Android setup steps into reusable action
igordmn Sep 16, 2026
0750805
Simplify Android validation script path in workflow
igordmn Sep 16, 2026
d3bb3cc
Change Android validation script execution to run from examples direc…
igordmn Sep 16, 2026
d5c6030
Consolidate Android setup into setup-prerequisites action
igordmn Sep 16, 2026
6878c71
Remove Android emulator from example validation
igordmn Sep 16, 2026
c6d29dd
Rename example validation scripts for clarity
igordmn Sep 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/setup-prerequisites/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Setup Prerequisites'
runs:
using: "composite"
steps:
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'jetbrains'
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Setup Android SDK
uses: android-actions/setup-android@v4
with:
packages: platform-tools

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-home-cache-excludes: |
caches/jars-9
caches/transforms-3
26 changes: 26 additions & 0 deletions .github/actions/setup-xcode/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Setup Xcode'
inputs:
xcode-path:
description: 'Path to the Xcode app bundle to select.'
required: false
default: /Applications/Xcode_26.5.app
cache-key-suffix:
description: 'Suffix appended to the DerivedData cache key.'
required: false
default: 26.5
runs:
using: "composite"
steps:
- name: Setup Xcode version
shell: bash
run: |
sudo xcode-select -s "${{ inputs.xcode-path }}"
/usr/bin/xcodebuild -version

- name: Cache Xcode DerivedData
uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ inputs.cache-key-suffix }}-${{ github.sha }}
restore-keys: |
xcode-cache-deriveddata-${{ inputs.cache-key-suffix }}-
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
72 changes: 72 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Validate examples

on:
pull_request:
paths:
- 'examples/**'
- '.github/actions/**'
- '.github/workflows/examples.yml'
push:
branches:
- master
paths:
- 'examples/**'
- '.github/actions/**'
- '.github/workflows/examples.yml'
workflow_dispatch:

jobs:
desktop:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Prerequisites
uses: ./.github/actions/setup-prerequisites

- name: Validate desktop examples
working-directory: examples
run: ./validateExamples.sh

web:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Prerequisites
uses: ./.github/actions/setup-prerequisites

- name: Validate web examples
working-directory: examples
run: ./validateExamplesWithJs.sh

android:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Prerequisites
uses: ./.github/actions/setup-prerequisites

- name: Validate Android examples
working-directory: examples
run: ./validateExamplesAndroid.sh

ios:
runs-on: macos-26-xlarge
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Prerequisites
uses: ./.github/actions/setup-prerequisites

- name: Setup Xcode
uses: ./.github/actions/setup-xcode

- name: Validate iOS examples
working-directory: examples
run: ./validateExamplesIos.sh
4 changes: 3 additions & 1 deletion examples/chat/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ dependencies {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "org.jetbrains.chat"
defaultConfig {
applicationId = "org.jetbrains.Chat"
Expand Down
4 changes: 3 additions & 1 deletion examples/chat/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ kotlin {

android {
namespace = "org.jetbrains.chat.shared"
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
minSdk = 26

androidResources {
Expand Down
4 changes: 3 additions & 1 deletion examples/codeviewer/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ dependencies {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "org.jetbrains.codeviewer"
defaultConfig {
applicationId = "org.jetbrains.Codeviewer"
Expand Down
4 changes: 3 additions & 1 deletion examples/codeviewer/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ kotlin {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "org.jetbrains.codeviewer.common"
minSdk = 26

Expand Down
4 changes: 3 additions & 1 deletion examples/graphics-2d/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ dependencies {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "org.jetbrains.graphics2d"
defaultConfig {
applicationId = "org.jetbrains.Graphics2D"
Expand Down
4 changes: 3 additions & 1 deletion examples/graphics-2d/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ kotlin {

android {
namespace = "org.jetbrains.Graphics2D"
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
minSdk = 26

androidResources {
Expand Down
4 changes: 3 additions & 1 deletion examples/imageviewer/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ dependencies {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "example.imageviewer"
defaultConfig {
applicationId = "org.jetbrains.Imageviewer"
Expand Down
4 changes: 3 additions & 1 deletion examples/imageviewer/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ kotlin {

android {
namespace = "example.imageviewer.shared"
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
minSdk = 26

androidResources {
Expand Down
4 changes: 3 additions & 1 deletion examples/issues/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ kotlin {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "com.example.myapplication"

defaultConfig {
Expand Down
4 changes: 3 additions & 1 deletion examples/issues/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ kotlin {

android {
namespace = "com.example.myapplication.common"
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
minSdk = 26

compilerOptions {
Expand Down
4 changes: 3 additions & 1 deletion examples/nav_cupcake/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ dependencies {
}

android {
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
namespace = "org.jetbrains.nav_cupcake"
defaultConfig {
applicationId = "org.jetbrains.nav_cupcake"
Expand Down
4 changes: 3 additions & 1 deletion examples/nav_cupcake/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ kotlin {

android {
namespace = "org.jetbrains.nav_cupcake.shared"
compileSdk = 37
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
minSdk = 26

androidResources {
Expand Down
27 changes: 20 additions & 7 deletions examples/validateExamples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,30 @@

set -euo pipefail

if [ "$#" -ne 2 ]; then
echo "Specify Compose and Kotlin version. For example: ./validateExamples.sh 1.1.1 1.6.10"
exit 1
if [ "$#" -gt 2 ]; then
echo "Optionally specify Compose and Kotlin versions. For example: ./validateExamples.sh 1.13.0-alpha03 2.3.20"
exit 1
fi

version_args=()
if [ "$#" -eq 1 ]; then
version_args=("-Pcompose.version=$1")
fi

if [ "$#" -eq 2 ]; then
version_args=("-Pcompose.version=$1" "-Pkotlin.version=$2")
fi
COMPOSE_VERSION=$1
KOTLIN_VERSION=$2


runGradle() {
pushd $1
./gradlew $2 -Pcompose.version=$COMPOSE_VERSION -Pkotlin.version=$KOTLIN_VERSION
local example="$1"
local task="$2"
pushd "$example"
if [ "${#version_args[@]}" -gt 0 ]; then
./gradlew "$task" "${version_args[@]}"
else
./gradlew "$task"
fi
popd
}

Expand Down
38 changes: 25 additions & 13 deletions examples/validateExamplesAndroid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,35 @@

set -euo pipefail

if [ "$#" -ne 2 ]; then
echo "Specify Compose and Kotlin version. For example: ./validateExamplesAndroid.sh 1.1.1 1.6.10"
exit 1
if [ "$#" -gt 2 ]; then
echo "Optionally specify Compose and Kotlin versions. For example: ./validateExamplesAndroid.sh 1.13.0-alpha03 2.3.20"
exit 1
fi

version_args=()
if [ "$#" -eq 1 ]; then
version_args=("-Pcompose.version=$1")
fi

if [ "$#" -eq 2 ]; then
version_args=("-Pcompose.version=$1" "-Pkotlin.version=$2")
fi
COMPOSE_VERSION=$1
KOTLIN_VERSION=$2


runGradle() {
pushd $1
./gradlew $2 -Pcompose.version=$COMPOSE_VERSION -Pkotlin.version=$KOTLIN_VERSION --rerun-tasks
local example="$1"
local task="$2"
pushd "$example"
if [ "${#version_args[@]}" -gt 0 ]; then
./gradlew "$task" "${version_args[@]}" --rerun-tasks
else
./gradlew "$task" --rerun-tasks
fi
popd
}

# requires an emulator running or an Android device to be connected
runGradle chat installDebug
runGradle codeviewer installDebug
runGradle imageviewer installDebug
runGradle issues installDebug
runGradle graphics-2d installDebug
runGradle chat assembleDebug
runGradle codeviewer assembleDebug
runGradle imageviewer assembleDebug
runGradle issues assembleDebug
runGradle graphics-2d assembleDebug
28 changes: 20 additions & 8 deletions examples/validateExamplesIos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,30 @@

set -euo pipefail

if [ "$#" -ne 2 ]; then
echo "Specify Compose and Kotlin version. For example: ./validateExamplesIos.sh 1.1.1 1.6.10"
exit 1
if [ "$#" -gt 2 ]; then
echo "Optionally specify Compose and Kotlin versions. For example: ./validateExamplesIos.sh 1.13.0-alpha03 2.3.20"
exit 1
fi

version_args=()
if [ "$#" -eq 1 ]; then
version_args=("-Pcompose.version=$1")
fi

if [ "$#" -eq 2 ]; then
version_args=("-Pcompose.version=$1" "-Pkotlin.version=$2")
fi
COMPOSE_VERSION=$1
KOTLIN_VERSION=$2


runGradle() {
pushd $1
echo "Validating $1"
./gradlew clean linkIosArm64 -Pcompose.version=$COMPOSE_VERSION -Pkotlin.version=$KOTLIN_VERSION --rerun-tasks || (echo "Failed $1" && exit 1)
local example="$1"
pushd "$example"
echo "Validating $example"
if [ "${#version_args[@]}" -gt 0 ]; then
./gradlew clean linkIosArm64 "${version_args[@]}" --rerun-tasks || (echo "Failed $example" && exit 1)
else
./gradlew clean linkIosArm64 --rerun-tasks || (echo "Failed $example" && exit 1)
fi
popd
}

Expand Down
Loading
Loading