b130d0f77c
Soong needs every transitive edge spelled out as static_libs — the old generator emitted bare imports, so consumers compiled but failed at dex/runtime (this bit coil). Now each artifact's POM is parsed: compile/runtime deps become static_libs; in-group deps are auto-downloaded into the same repo (KMP -android variants probed); out-of-group deps map to in-tree module names via coordinate_map (null = ignore), with warnings for anything unmapped. Explicit deps: lists merge in; pom_deps: false or --no-pom opts out. Config: coil pinned at 3.5.0 with the full six-artifact graph, splashscreen 1.0.1 added, accompanist gains drawablepainter.
198 lines
11 KiB
YAML
198 lines
11 KiB
YAML
# maven-to-lib config
|
|
#
|
|
# Run:
|
|
# python maven-to-lib.py # download all libs
|
|
# python maven-to-lib.py --lib coil # single lib
|
|
# python maven-to-lib.py --git-init # also commit on version branch
|
|
# python maven-to-lib.py --output /path/to/repos # custom base output dir
|
|
# python maven-to-lib.py --no-pom # skip POM dep resolution
|
|
#
|
|
# Dependency wiring — Soong has no Maven resolution, so every dependency an
|
|
# artifact needs must appear as a static_libs edge on its import module:
|
|
# * By default each artifact's POM is parsed. In-group deps (same Maven
|
|
# group as the lib) are downloaded into the same repo automatically
|
|
# (KMP "-android" variants are probed). Out-of-group deps are translated
|
|
# to in-tree Soong module names through coordinate_map below; anything
|
|
# unmapped prints a warning.
|
|
# * `deps: [module, ...]` on an artifact adds manual edges (merged with
|
|
# POM-derived ones; also the only source of edges with pom_deps: false
|
|
# on the lib or --no-pom on the command line).
|
|
|
|
# Applied to every lib unless the lib overrides them.
|
|
defaults:
|
|
sdk_version: current
|
|
min_sdk_version: "36"
|
|
|
|
# Maven repositories searched in order for every artifact.
|
|
# Can be overridden per-lib with a maven_repos key on the lib entry.
|
|
maven_repos:
|
|
- https://repo1.maven.org/maven2
|
|
- https://dl.google.com/dl/android/maven2
|
|
|
|
# Maven coordinate (group:artifact) -> Soong module name, used to wire
|
|
# POM dependencies that live OUTSIDE the lib being generated (AOSP prebuilts,
|
|
# external/ projects, or other prebuilt_libs repos). Map a coordinate to null
|
|
# to acknowledge-and-ignore it (no warning, no edge). Artifact names may be
|
|
# written without the KMP -android suffix — both spellings match.
|
|
coordinate_map:
|
|
# other prebuilt_libs repos
|
|
com.squareup.okio:okio: okio
|
|
com.squareup.okio:okio-jvm: okio
|
|
com.squareup.okhttp3:okhttp: okhttp3
|
|
com.google.accompanist:accompanist-drawablepainter: accompanist-drawablepainter
|
|
# AOSP external/
|
|
org.jetbrains.kotlin:kotlin-stdlib: kotlin-stdlib
|
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8: kotlin-stdlib-jdk8
|
|
org.jetbrains.kotlinx:kotlinx-coroutines-core: kotlinx-coroutines-core
|
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm
|
|
org.jetbrains.kotlinx:kotlinx-coroutines-android: kotlinx-coroutines-android
|
|
com.google.code.gson:gson: gson
|
|
# AOSP prebuilts/sdk androidx
|
|
androidx.annotation:annotation: androidx.annotation_annotation
|
|
androidx.annotation:annotation-jvm: androidx.annotation_annotation
|
|
androidx.activity:activity: androidx.activity_activity
|
|
androidx.activity:activity-compose: androidx.activity_activity-compose
|
|
androidx.appcompat:appcompat: androidx.appcompat_appcompat
|
|
androidx.appcompat:appcompat-resources: androidx.appcompat_appcompat-resources
|
|
androidx.core:core: androidx.core_core
|
|
androidx.core:core-ktx: androidx.core_core-ktx
|
|
androidx.collection:collection: androidx.collection_collection
|
|
androidx.collection:collection-ktx: androidx.collection_collection-ktx
|
|
androidx.lifecycle:lifecycle-runtime: androidx.lifecycle_lifecycle-runtime
|
|
androidx.lifecycle:lifecycle-runtime-ktx: androidx.lifecycle_lifecycle-runtime-ktx
|
|
androidx.exifinterface:exifinterface: androidx.exifinterface_exifinterface
|
|
androidx.profileinstaller:profileinstaller: androidx.profileinstaller_profileinstaller
|
|
androidx.compose.foundation:foundation: androidx.compose.foundation_foundation
|
|
androidx.compose.ui:ui: androidx.compose.ui_ui
|
|
androidx.compose.runtime:runtime: androidx.compose.runtime_runtime
|
|
# JetBrains' KMP compose coordinates = the androidx artifacts on Android
|
|
org.jetbrains.compose.foundation:foundation: androidx.compose.foundation_foundation
|
|
org.jetbrains.compose.ui:ui: androidx.compose.ui_ui
|
|
org.jetbrains.compose.runtime:runtime: androidx.compose.runtime_runtime
|
|
# annotation-only / compile-time-only artifacts: no runtime payload to bundle
|
|
org.jetbrains:annotations: null
|
|
|
|
libs:
|
|
|
|
# ── Image loading ──────────────────────────────────────────────────────────
|
|
# Coil 3.x is Kotlin Multiplatform — the Android payloads use the -android
|
|
# artifact suffix, and module names drop it (coil-core, coil-compose, ...).
|
|
# Version is PINNED: the manifest revision (prebuilt_libs_coil @ 3.5.0) and
|
|
# app code (coil3.* imports) move together, never via 'latest'.
|
|
# Consumers need "coil-compose" + "coil-network-okhttp" (Coil 3 core ships
|
|
# no network fetcher; the okhttp one self-registers via ServiceLoader).
|
|
- name: coil
|
|
version: "3.5.0"
|
|
artifacts:
|
|
- { group: io.coil-kt.coil3, artifact: coil-core-android, bp_name: coil-core }
|
|
- { group: io.coil-kt.coil3, artifact: coil-android, bp_name: coil }
|
|
- { group: io.coil-kt.coil3, artifact: coil-compose-core-android, bp_name: coil-compose-core }
|
|
- { group: io.coil-kt.coil3, artifact: coil-compose-android, bp_name: coil-compose }
|
|
- { group: io.coil-kt.coil3, artifact: coil-network-core-android, bp_name: coil-network-core }
|
|
- { group: io.coil-kt.coil3, artifact: coil-network-okhttp-android, bp_name: coil-network-okhttp }
|
|
|
|
- name: glide
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.github.bumptech.glide, artifact: glide }
|
|
- { group: com.github.bumptech.glide, artifact: compose, bp_name: glide-compose }
|
|
|
|
# ── Networking ─────────────────────────────────────────────────────────────
|
|
- name: okio # required transitive dep of okhttp + retrofit
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.squareup.okio, artifact: okio }
|
|
|
|
- name: okhttp
|
|
version: latest
|
|
artifacts:
|
|
# bp_name okhttp3: "okhttp" collides with the ART module SDK
|
|
- { group: com.squareup.okhttp3, artifact: okhttp, bp_name: okhttp3 }
|
|
- { group: com.squareup.okhttp3, artifact: logging-interceptor, bp_name: okhttp-logging-interceptor }
|
|
|
|
- name: retrofit
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.squareup.retrofit2, artifact: retrofit }
|
|
- { group: com.squareup.retrofit2, artifact: converter-gson, bp_name: retrofit-converter-gson }
|
|
- { group: com.squareup.retrofit2, artifact: converter-moshi, bp_name: retrofit-converter-moshi }
|
|
|
|
# ── JSON ───────────────────────────────────────────────────────────────────
|
|
- name: moshi
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.squareup.moshi, artifact: moshi }
|
|
- { group: com.squareup.moshi, artifact: moshi-kotlin, bp_name: moshi-kotlin }
|
|
|
|
- name: kotlinx-serialization
|
|
version: latest
|
|
artifacts:
|
|
- { group: org.jetbrains.kotlinx, artifact: kotlinx-serialization-json, bp_name: kotlinx-serialization-json }
|
|
- { group: org.jetbrains.kotlinx, artifact: kotlinx-serialization-core, bp_name: kotlinx-serialization-core }
|
|
|
|
# ── Dependency injection ───────────────────────────────────────────────────
|
|
- name: koin # DI without annotation processors
|
|
version: latest
|
|
artifacts:
|
|
- { group: io.insert-koin, artifact: koin-android, bp_name: koin-android }
|
|
- { group: io.insert-koin, artifact: koin-androidx-compose, bp_name: koin-compose }
|
|
|
|
# ── Animations ─────────────────────────────────────────────────────────────
|
|
- name: lottie
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.airbnb.android, artifact: lottie }
|
|
- { group: com.airbnb.android, artifact: lottie-compose, bp_name: lottie-compose }
|
|
|
|
# ── Compose utilities ──────────────────────────────────────────────────────
|
|
- name: accompanist
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.google.accompanist, artifact: accompanist-permissions, bp_name: accompanist-permissions }
|
|
# runtime dep of coil-compose-core
|
|
- { group: com.google.accompanist, artifact: accompanist-drawablepainter, bp_name: accompanist-drawablepainter }
|
|
|
|
- name: splashscreen # androidx core-splashscreen is NOT in AOSP prebuilts/sdk
|
|
version: "1.0.1"
|
|
artifacts:
|
|
- { group: androidx.core, artifact: core-splashscreen, bp_name: androidx.core_core-splashscreen }
|
|
|
|
# ── Utilities ──────────────────────────────────────────────────────────────
|
|
- name: timber
|
|
version: latest
|
|
artifacts:
|
|
- { group: com.jakewharton.timber, artifact: timber }
|
|
|
|
- name: jsoup
|
|
version: latest
|
|
artifacts:
|
|
- { group: org.jsoup, artifact: jsoup, type: jar }
|
|
|
|
- name: commons
|
|
artifacts:
|
|
- { group: org.apache.commons, artifact: commons-lang3, type: jar, version: latest }
|
|
- { group: commons-io, artifact: commons-io, type: jar, version: latest }
|
|
|
|
# ── QR / Barcode ───────────────────────────────────────────────────────────
|
|
- name: zxing
|
|
artifacts:
|
|
- { group: com.google.zxing, artifact: core, type: jar, version: latest }
|
|
- { group: com.journeyapps, artifact: zxing-android-embedded, version: latest, bp_name: zxing-android }
|
|
|
|
# ── Ktor (KMP HTTP client — alternative to OkHttp+Retrofit) ───────────────
|
|
- name: ktor
|
|
version: latest
|
|
artifacts:
|
|
- { group: io.ktor, artifact: ktor-client-android, bp_name: ktor-client-android }
|
|
- { group: io.ktor, artifact: ktor-client-content-negotiation, bp_name: ktor-client-content-negotiation }
|
|
- { group: io.ktor, artifact: ktor-serialization-kotlinx-json, bp_name: ktor-serialization-kotlinx-json }
|
|
|
|
# ── Custom Maven repo / manual deps example ────────────────────────────────
|
|
# - name: mylib
|
|
# version: "1.2.0"
|
|
# pom_deps: false # opt out of POM parsing for this lib
|
|
# maven_repos:
|
|
# - https://maven.example.com/releases
|
|
# artifacts:
|
|
# - { group: com.example, artifact: mylib, deps: [okhttp3, gson] }
|