Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/gradle/kotlin-1.9.24
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo authored May 14, 2024
2 parents e544308 + 93a2fb7 commit cc28786
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
16 changes: 12 additions & 4 deletions .github/actions/setup-host/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ runs:
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ inputs.gradle-encryption-key }}
cache-read-only: false
- name: Add Android SDK to PATH
shell: bash
run: |
echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV"
echo "$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools" >> "$GITHUB_PATH"
- name: Accept Android licences
shell: bash
run: (yes || true) | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
- # https://developer.android.com/studio/test/gradle-managed-devices#create_a_gradle_managed_device
name: Set `swiftshader_indirect` on Android Emulators (required by GHA)
run: yes | sdkmanager --licenses || true
- name: Enable Hardware Acceleration
shell: bash
run: echo "android.testoptions.manageddevices.emulator.gpu=swiftshader_indirect" >> ~/.gradle/gradle.properties
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
jobs:
build:
name: Build
runs-on: macos-latest # to use Android emulator
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 0 additions & 5 deletions demo-project/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ android {
}
}

compileOptions {
sourceCompatibility(java.sourceCompatibility)
targetCompatibility(java.targetCompatibility)
}

testOptions {
unitTests {
isIncludeAndroidResources = true
Expand Down
5 changes: 0 additions & 5 deletions demo-project/login/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ android {
)
}
}

compileOptions {
sourceCompatibility(java.sourceCompatibility)
targetCompatibility(java.targetCompatibility)
}
}

dependencies {
Expand Down
10 changes: 5 additions & 5 deletions demo-project/ui-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ android {
}
}

val pixel2 by android.testOptions.managedDevices.devices.creating(ManagedVirtualDevice::class) {
device = "Pixel 6"
apiLevel = 30
systemImageSource = "aosp-atd"
val emulator by android.testOptions.managedDevices.devices.creating(ManagedVirtualDevice::class) {
device = "Pixel 2"
apiLevel = libs.versions.android.compileSDK.get().toInt()
systemImageSource = "aosp_atd"
}

baselineProfile {
useConnectedDevices = false
managedDevices += pixel2.name
managedDevices += emulator.name
}

dependencies {
Expand Down

0 comments on commit cc28786

Please sign in to comment.