Compose Multiplatform Core

repository·jb-main·Indexed 20 days ago

https://github.com/jetbrains/compose-multiplatform-core

A repository containing core libraries and tools, including Android Jetpack components such as androidx.activity, androidx.annotation, androidx.browser, and androidx.camera (CameraX). It features the Binary Compatibility Validator for klib files, the androidx.benchmark.darwin Gradle plugin for iOS and macOS benchmarking, and internal build logic via buildSrc.

Tokens
149.1K
Snippets
363
Records
717
Agent score
71%

What's inside compose-multiplatform-core

  1. Overview of Privacy Sandbox tools integration tests

    jb-main

    The Privacy Sandbox tools integration tests verify the interaction between an Android app and an SDK using the App-SDK bridge (the "shim library"). The testing environment is composed of three main components:

    1. testsdk/: A custom SDK built using the API Compiler. It manually sets AidlInput and FrameworkAidlInput to allow testing with HEAD versions of the shim tools, bypassing the standard androidx.privacysandbox.library dependency.
    2. testsdk-asb/: A wrapper that packages the testsdk into an Android SDK Bundle (ASB) using com.android.privacy-sandbox-sdk.
    3. testapp/: A simple Android application that depends on testsdk-asb. This component utilizes the HEAD version of the API Generator and serves as the primary host for the integration tests.
  2. Overview of Android Jetpack

    jb-main

    Android Jetpack is a suite of libraries, tools, and guidance designed to help developers write high-quality apps by reducing boilerplate and simplifying complex tasks.

    Key characteristics:

    • Package Namespace: Uses the androidx.* package.
    • Unbundled APIs: Components are unbundled from platform APIs, providing backward compatibility and more frequent updates than the Android platform itself.
    • Distribution: Official AARs and JARs are distributed via Google Maven.
  3. Overview of the androidx.browser library

    jb-main
    The androidx.browser library provides an interface for Android application developers to interact with and utilize web browsers. A primary feature of this library is the Custom Tabs API, which enables an application to open a URL within a fully-featured web browser interface while maintaining the user within the calling application's task context.
  4. Overview of the Inspection Gradle Plugin

    jb-main

    The inspection-gradle-plugin is a Gradle plugin designed to package special-purpose inspection libraries (inspector.jar) inside Android libraries (.aar files).

    These inspector JARs enable Android Studio to provide live, detailed insights into a library's behavior within a running application, such as inspecting Compose layouts or WorkManager jobs. The plugin automates the workflow between two distinct project types:

    1. Inspector Project: An Android library module containing the actual inspection logic (e.g., :work:work-inspection).
    2. Target Library Project: The library being inspected, which hosts the inspector at runtime (e.g., :work:work-runtime).
  5. Overview of androidx.fragment

    jb-main
    The androidx.fragment library provides Fragments, which are modular building blocks for Android user interfaces. Fragments allow you to encapsulate specific parts of your UI or behavior into reusable components that can be hosted within an Activity or another Fragment. This enables more flexible UI designs and easier management of complex screen behaviors.
  6. Overview of the androidx.compose.runtime package

    jb-main

    The androidx.compose.runtime package provides the core building blocks for Compose, including state management, side-effect handling, coroutine integration, and composition lifecycle control.

    Key functional areas include:

    • State Management: APIs for tracking and reacting to data changes (e.g., State, remember, mutableStateOf, collectAsState).
    • Side-effects: APIs for managing non-pure operations within the composition lifecycle (e.g., LaunchedEffect, SideEffect).
    • Coroutines Integration: Tools to bridge Compose with Kotlin Coroutines (e.g., rememberCoroutineScope, snapshotFlow).
    • Composition Control: APIs for managing the composition tree and recomposition (e.g., Composition, Recomposer, RecomposeScope, CompositionLocal).
    • Time/Clock APIs: Tools for frame-based synchronization (e.g., MonotonicFrameClock, withFrameMillis).
    • Annotations: Metadata to guide the compiler (e.g., @Composable, @Stable).