Skip to content

Commit 961bcbe

Browse files
authored
Merge pull request #1 from codenameone/codex/create-java-command-line-tool-for-skin-generation
Add Java CLI for converting Android AVD skins to Codename One
2 parents 21d4121 + f06e0aa commit 961bcbe

File tree

2 files changed

+851
-0
lines changed

2 files changed

+851
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: AVD Skin Conversion
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/avd-skin-conversion.yml'
7+
- 'AvdSkinToCodenameOneSkin.java'
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
convert:
16+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'synchronize' || github.event.before != '0000000000000000000000000000000000000000' }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Java 21
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: temurin
26+
java-version: '21'
27+
28+
- name: Install WebP conversion tools
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y webp
32+
33+
- name: Download sample AVD skin
34+
run: |
35+
set -euo pipefail
36+
curl -L --fail --retry 5 --retry-delay 5 -o skins.zip https://github.com/larskristianhaga/Android-emulator-skins/archive/refs/heads/master.zip
37+
mkdir -p skins
38+
unzip -q skins.zip "Android-emulator-skins-master/nexus_10/*" -d skins
39+
40+
- name: Convert AVD skin to Codename One skin
41+
run: |
42+
mkdir -p build
43+
java AvdSkinToCodenameOneSkin.java skins/Android-emulator-skins-master/nexus_10 build/nexus_10.skin
44+
45+
- name: Validate Codename One skin archive
46+
run: |
47+
test -f build/nexus_10.skin
48+
unzip -l build/nexus_10.skin
49+
50+
- name: Upload converted skin artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: nexus-10-codenameone-skin
54+
path: build/nexus_10.skin

0 commit comments

Comments
 (0)