Skip to content

Add adaptive icon generation and mipmap resources to AndroidGradleBuilder#4569

Merged
shai-almog merged 1 commit intomasterfrom
codex/add-support-for-adaptive-icons
Feb 25, 2026
Merged

Add adaptive icon generation and mipmap resources to AndroidGradleBuilder#4569
shai-almog merged 1 commit intomasterfrom
codex/add-support-for-adaptive-icons

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Add support for Android adaptive icons so Gradle-built projects can provide modern launcher assets and XML adaptive-icon definitions when requested.

Description

  • Read android.enableAdaptiveIcons request arg and create mipmap-* and mipmap-anydpi-v26 resource directories when enabled.
  • Generate standard ic_launcher.png and ic_launcher_foreground.png images at multiple densities from the app icon and place them into the corresponding mipmap-* folders.
  • Support an adaptive icon background either from an image file given in android.adaptiveIconBackgroundImage or from a color specified in android.adaptiveIconBackground, emitting ic_launcher_background as a bitmap or a color resource accordingly.
  • Write ic_launcher.xml and ic_launcher_round.xml into mipmap-anydpi-v26 to reference the foreground and background drawables, and update the application node to use @mipmap/ic_launcher and @mipmap/ic_launcher_round when adaptive icons are enabled.

Testing

  • Built the Maven plugin with mvn package to ensure compilation and packaging succeeded, and the build completed successfully.
  • Ran unit tests with mvn test and all tests passed.

Codex Task

@github-actions
Copy link

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Feb 25, 2026

Compared 31 screenshots: 31 matched.

Native Android coverage

  • 📊 Line coverage: 7.23% (3673/50829 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.63% (18010/319865), branch 2.72% (845/31109), complexity 3.36% (999/29734), method 5.94% (822/13848), class 9.73% (178/1829)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 7.23% (3673/50829 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.63% (18010/319865), branch 2.72% (845/31109), complexity 3.36% (999/29734), method 5.94% (822/13848), class 9.73% (178/1829)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

@shai-almog shai-almog merged commit d9bc5e5 into master Feb 25, 2026
14 checks passed
@shai-almog
Copy link
Collaborator Author

shai-almog commented Feb 25, 2026

Compared 31 screenshots: 31 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 303 seconds
  • Compilation Time: 413 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 27578 ms
Extract Extensions 13 ms
Google Services Setup 2 ms
Scan Classes 608 ms
Extract Libs 958 ms
Inject Build Hints 35 ms
Generate Unit Tests 2 ms
Generate Stubs 968 ms
Compile Stubs 2087 ms
Generate Icons 1167 ms
Prepare ParparVM 599 ms
ParparVM Execution 185239 ms
Post-VM Setup 219 ms
CocoaPods 4131 ms
Finalize 25 ms
Total Time 223632 msMaven Overhead : 80000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot 91000 ms
Simulator Boot (Run) 6000 ms
App Install 26000 ms
App Launch 14000 ms
Test Execution 207000 ms

@DurankGts
Copy link
Contributor

is this can be used in the Ant structure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants