try gradle emulator

This commit is contained in:
Matthieu 2022-07-26 15:10:14 +02:00
parent 3f49be6355
commit a1fe894212
4 changed files with 24 additions and 22 deletions

View File

@ -1,13 +1,5 @@
image: registry.gitlab.com/fdroid/ci-images-client
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
# Basic android and gradle stuff
# Check linting
lintDebug:
@ -47,17 +39,10 @@ debugTests:
.connected-template: &connected-template
stage: test
image: registry.gitlab.com/fdroid/ci-images-client
image: cimg/android:2022.06
script:
- start-emulator
- wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
# Switch to right java version for building the app
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
- ./gradlew connectedStagingAndroidTest || (adb -e logcat -d > logcat.txt; exit 1)
- ./gradlew pixel2api30stagingAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
artifacts:
paths:
- logcat.txt

View File

@ -1,3 +1,5 @@
import com.android.build.api.dsl.ManagedVirtualDevice
plugins {
id "com.cookpad.android.plugin.license-tools" version "1.2.2"
}
@ -82,9 +84,24 @@ android {
variant.resValue 'string', 'application_id', variant.applicationId
}
testOptions {
animationsDisabled true
managedDevices {
devices {
pixel2api30 (ManagedVirtualDevice) {
// Use device profiles you typically see in Android Studio.
device = "Pixel 2"
// Use only API levels 27 and higher.
apiLevel = 30
// To include Google services, use "google".
systemImageSource = "aosp"
// Whether the image must be a 64 bit image. Defaults to false,
// in which case the managed device will use a 32 bit image.
// Not applicable to arm64 machines.
require64Bit = false
}
}
}
}
buildFeatures {

View File

@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.3.0-beta05'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong

View File

@ -1,7 +1,7 @@
#Tue Jun 07 20:42:16 CEST 2022
#Tue Jul 26 13:21:08 GMT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302
distributionSha256Sum=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634