2121 workflow_call :
2222 inputs :
2323 log4j-version :
24- description : ' Log4j version'
25- required : true
24+ description : Version of Log4j Core
2625 type : string
26+ # Should point to the current 2.x snapshot version
27+ default : 2.25.0-SNAPSHOT
28+ log4j-repository-url :
29+ description : Additional Maven repository
30+ type : string
31+ default : ' https://repository.apache.org/snapshots'
2732
2833permissions : read-all
2934
4651
4752 - name : Setup Gradle
4853 uses : gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # 4.1.0
54+ with :
55+ develocity-access-key : ${{ secrets.GE_ACCESS_KEY }}
56+ develocity-injection-enabled : true
57+ develocity-url : https://ge.apache.org
58+ develocity-plugin-version : 3.18.1
59+
4960
5061 - name : Enable KVM
5162 run : |
@@ -56,10 +67,17 @@ jobs:
5667 - name : Create AVD Device
5768 id : avd
5869 shell : bash
59- env :
60- ANDROID_SDK_VERSION : 10406996
61- ANDROID_SDK_CHECKSUM : 8919e8752979db73d8321e9babe2caedcc393750817c1a5f56c128ec442fb540
6270 run : |
71+ # Debug environment variables
72+ printenv | grep '^ANDROID\|^HOME' | sort
73+
74+ # Set `ANDROID_USER_HOME` since `emulator` and `avdmanager` use different definitions:
75+ # * `avdmanager` uses `$XDG_CONFIG_HOME/.android` with a fallback to `$HOME/.android`:
76+ # https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:common/src/main/java/com/android/prefs/AbstractAndroidLocations.kt
77+ # * `emulator` uses `HOME/.android`
78+ export ANDROID_USER_HOME="$HOME/.android"
79+ echo "ANDROID_USER_HOME=$ANDROID_USER_HOME" >> $GITHUB_ENV
80+
6381 # List installed and available packages
6482 $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list
6583 # Download images
7189 --name generic-api-31-device \
7290 --device "5.4in FWVGA" \
7391 --package "system-images;android-31;default;x86_64"
92+ $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list avds
7493 # Run emulator
7594 $ANDROID_HOME/emulator/emulator \
7695 -no-audio -no-window \
@@ -91,10 +110,12 @@ jobs:
91110 shell : bash
92111 env :
93112 LOG4J_VERSION : ${{ inputs.log4j-version }}
113+ LOG4J_REPOSITORY_URL : ${{ inputs.log4j-repository-url }}
94114 run : |
95115 log4j-samples-android/gradlew -p log4j-samples-android \
96116 --console plain \
97117 -Plog4j.version=$LOG4J_VERSION \
118+ -Plog4j.repository.url=$LOG4J_REPOSITORY_URL \
98119 build connectedCheck
99120
100121 - name : Remove AVD Device
0 commit comments