زمان اجرا را بنویسید

بلوک‌های سازنده‌ی اساسی مدل برنامه‌نویسی و مدیریت حالت Compose، و زمان اجرای اصلی برای افزونه‌ی کامپایلر Compose جهت هدف قرار دادن.
آخرین به‌روزرسانی انتشار پایدار کاندیدای انتشار انتشار بتا انتشار آلفا
۲۲ اکتبر ۲۰۲۵ ۱.۹.۴ - ۱.۱۰.۰-بتا۰۱ -

ساختار

Compose ترکیبی از ۷ شناسه گروه Maven در androidx است. هر گروه شامل زیرمجموعه‌ای هدفمند از عملکردها است که هر کدام مجموعه یادداشت‌های انتشار خود را دارند.

این جدول گروه‌ها و پیوندهای مربوط به هر مجموعه از یادداشت‌های انتشار را توضیح می‌دهد.

گروه توضیحات
ساخت.انیمیشن برای غنی‌سازی تجربه کاربری، در برنامه‌های Jetpack Compose خود انیمیشن بسازید.
کامپایلر compose توابع @Composable را تبدیل کنید و بهینه‌سازی‌ها را با یک افزونه کامپایلر Kotlin فعال کنید.
آهنگسازی.بنیاد با استفاده از بلوک‌های سازنده آماده، برنامه‌های Jetpack Compose بنویسید و پایه و اساس را برای ساخت قطعات سیستم طراحی خود گسترش دهید.
نوشتن.ماده رابط‌های کاربری Jetpack Compose را با کامپوننت‌های آماده‌ی طراحی متریال بسازید. این نقطه‌ی ورود سطح بالاتر Compose است که برای ارائه کامپوننت‌هایی مطابق با کامپوننت‌های شرح داده شده در www.material.io طراحی شده است.
ترکیب.material3 ساخت رابط‌های کاربری Jetpack Compose با کامپوننت‌های Material Design 3، تکامل بعدی طراحی متریال. متریال ۳ شامل قالب‌بندی و کامپوننت‌های به‌روز شده و ویژگی‌های شخصی‌سازی Material You مانند رنگ پویا است و به گونه‌ای طراحی شده است که با سبک بصری جدید اندروید ۱۲ و رابط کاربری سیستم هماهنگ باشد.
نوشتن.زمان اجرا بلوک‌های سازنده‌ی اساسی مدل برنامه‌نویسی و مدیریت حالت Compose، و زمان اجرای اصلی برای افزونه‌ی کامپایلر Compose جهت هدف قرار دادن.
آهنگسازی.ui اجزای اساسی رابط کاربری compose که برای تعامل با دستگاه مورد نیاز هستند، شامل طرح‌بندی، ترسیم و ورودی.

اعلام وابستگی‌ها

برای افزودن یک وابستگی به Compose، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Maven گوگل را مطالعه کنید.

وابستگی‌های مربوط به مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:

شیار

dependencies {
    implementation "androidx.compose.runtime:runtime:1.9.4"
    implementation "androidx.compose.runtime:runtime-livedata:1.9.4"
    implementation "androidx.compose.runtime:runtime-rxjava2:1.9.4"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

dependencies {
    implementation("androidx.compose.runtime:runtime:1.9.4")
    implementation("androidx.compose.runtime:runtime-livedata:1.9.4")
    implementation("androidx.compose.runtime:runtime-rxjava2:1.9.4")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

برای اطلاعات بیشتر در مورد وابستگی‌ها، به «افزودن وابستگی‌های ساخت» مراجعه کنید.

بازخورد

بازخورد شما به بهبود Jetpack کمک می‌کند. اگر مشکلات جدیدی کشف کردید یا ایده‌هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. می‌توانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.

ایجاد یک مسئله جدید

برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.

ردیابی زمان اجرا نسخه ۱.۷

نسخه ۱.۷.۰-rc01

۱۸ سپتامبر ۲۰۲۴

androidx.compose.runtime:runtime-tracing:1.7.0-rc01 منتشر شد. نسخه 1.7.0-rc01 شامل این کامیت‌ها است.

ردیابی زمان اجرا نسخه ۱.۰

نسخه ۱.۰.۰-بتا۰۱

۲۹ نوامبر ۲۰۲۳

androidx.compose.runtime:runtime-tracing:1.0.0-beta01 منتشر شد. نسخه 1.0.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۰.۰-آلفا۰۵

۱۵ نوامبر ۲۰۲۳

androidx.compose.runtime:runtime-tracing:1.0.0-alpha05 منتشر شد. نسخه 1.0.0-alpha05 شامل این کامیت‌ها است.

رفع اشکالات

  • وابستگی‌ها به پایین‌ترین نسخه‌های پایدار پشتیبانی‌شده (یعنی compose-runtime و tracing-perfetto) پین شدند - مشکلی که باعث می‌شد compose-runtime-tracing نسخه جدیدتری از compose-runtime را به برنامه بیاورد، برطرف شد.

نسخه ۱.۰.۰-آلفا۰۴

۲۳ آگوست ۲۰۲۳

androidx.compose.runtime:runtime-tracing:1.0.0-alpha04 منتشر شد. نسخه 1.0.0-alpha04 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • سازگار با آخرین نسخه‌های Benchmark و Tracing Perfetto، که پشتیبانی از Composition Tracing را در هنگام راه‌اندازی برنامه (شروع سرد) مثلاً در AndroidX Benchmark و Android Studio (با شروع از Hedgehog Beta 2) فعال می‌کند.

تغییرات API

  • تغییر نام androidx.tracing.perfetto.Trace به androidx.tracing.perfetto.PerfettoSdkTrace . ( I44af8 )
  • سازگار کردن APIهای SDK مربوط به Tracing Perfetto با android.os.Trace ( I73ba0 ، b/282199917 )
  • پیش‌نیازهای ردیابی در هنگام راه‌اندازی برنامه. ( Iad890 )
  • فایل‌های API آزمایشی و عمومی ادغام شدند ( I0f2e1 ، b/278769092 )

نسخه ۱.۰.۰-آلفا۰۲

۸ فوریه ۲۰۲۳

androidx.compose.runtime:runtime-tracing:1.0.0-alpha02 منتشر شد. نسخه 1.0.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • بدون تغییر عملکردی. بهینه‌سازی‌های چندگانه عملکرد در وابستگی‌های پایین‌دستی androidx.tracing:tracing-perfetto* .

نسخه ۱.۰.۰-آلفا۰۱

۷ سپتامبر ۲۰۲۲

androidx.compose.runtime:runtime-tracing:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • androidx.compose.runtime:runtime-tracing کتابخانه‌ای است که - در صورت وجود ابزارهایی که از آن پشتیبانی می‌کنند (به زودی) - امکان ردیابی گسترده در یک برنامه Compose را فراهم می‌کند. این نسخه اولیه 1.0.0-alpha01 است.

نسخه ۱.۱۰

نسخه ۱.۱۰.۰-بتا۰۱

۲۲ اکتبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-beta01 منتشر شد. نسخه 1.10.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • RetainedValuesStore.getExitedValueOrDefault به RetainedValuesStore.getExitedValueOrElse تغییر نام داده شده است ( If9653 , b/452340613 )
  • isKeepingExitedValues ​​به isRetainingExitedValues ​​تغییر نام داده است ( I660bf ، b/437095756 )
  • RetainScope به RetainedValuesStore تغییر نام داده شده است. RetainScopeHolder به RetainedValuesStoreRegistry تغییر نام داده است. RetainScopeHolder.RetainScopeProvider به RetainedValuesStoreRegistry.ProvideChildRetainedValuesStore تغییر نام داده است. ( Idf23a ، b/437095756 )

رفع اشکالات

  • مقداردهی اولیه‌ی SavedState در SaveableStateRegistry تا اولین استفاده به تأخیر افتاد. ( Ic0a93 )

نسخه ۱.۱۰.۰-آلفا۰۵

۸ اکتبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-alpha05 منتشر شد. نسخه 1.10.0-alpha05 شامل این کامیت‌ها است.

رفع اشکالات

  • در حالت انتشار، مسیر پشته مربوط به DiagnosticComposeException را پر کنید. ( Ib76cb )
  • مشکلی در Snapshot state که در آن، هنگام استفاده از سیاست ادغام برای یک نوع، ممکن بود مقدار قبلی به اشتباه محاسبه شود و به جای مقدار قبلی، مقدار آینده‌ی state را برگرداند، برطرف شد. این مشکل در صورتی رخ می‌داد که بیش از دو Snapshot قابل تغییر در انتظار باشند و حداقل یکی از مقادیر اعمال شده دارای سیاست ادغام باشد. ( I527b5 , b/442791065 )

نسخه ۱.۱۰.۰-آلفا۰۴

۲۴ سپتامبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-alpha04 منتشر شد. نسخه 1.10.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • API RetainScopeHolder برای مدیریت مجموعه‌ای از RetainScopes اضافه شد. این می‌تواند برای پیاده‌سازی نگهداری برای کانتینرها و میزبان‌های ناوبری که فرزندان زیادی با طول عمر نگهداری متفاوت تشکیل می‌دهند، استفاده شود. ( I10e0f )
  • APIهای RetainedContentHost و retainControlledRetainScope اضافه شدند که می‌توانند برای ایجاد RetainScopes مدیریت‌شده خودکار برای ناپدید شدن محتوا مانند جمع شدن پنل‌ها استفاده شوند ( If81f6 )
  • سربارگذاری درون‌خطی Updater#set منسوخ شد زیرا مقدار ارائه شده را بیش از حد فشرده می‌کرد. سربارگذاری Updater#init اضافه شد که پارامتری می‌گیرد که از نیاز به گرفتن لامبدا جلوگیری می‌کند. ( Id679e )
  • RetainedEffect معرفی می‌کند، یک API با اثرات جانبی مشابه DisposableEffect که به جای چرخه عمر ترکیب، از چرخه عمر نگهداری پیروی می‌کند. این API برای استفاده برای اثراتی که به نگهداری شیء دیگری وابسته هستند که RetainObserver پیاده‌سازی نمی‌کند یا نمی‌تواند پیاده‌سازی کند، در نظر گرفته شده است. ( I1c61f ، b/177562901 )
  • مستندات RetainObserver.onRetained اصلاح و RetainObserver.onUnused اضافه شد که منعکس‌کننده RememberObserver.onAbandoned ( Ia6fc5 ) است.

رفع اشکالات

  • مشکل به خاطر سپردن ارسال بعد از اولین گروه در یک تابع (مانند فراخوانی ترکیبی) و قبل از گروهی که می‌توان آن را حذف کرد (مانند دستور if ) که می‌تواند onForgotten به ترتیب نادرست ارسال کند، برطرف شد. ( I453f6 , b/346821372 )
  • هنگام مقداردهی اولیه LaunchedEffect از پیمایش زمینه کوروتین خودداری کنید. ( I8d2c3b )

نسخه ۱.۱۰.۰-آلفا۰۳

۱۰ سپتامبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-alpha03 منتشر شد. نسخه 1.10.0-alpha03 شامل این کامیت‌ها است.

تغییرات API

  • ردیابی‌های پشته Compose مبتنی بر کلید گروهی را معرفی می‌کند که به طور پیش‌فرض برای همه برنامه‌های کوچک‌شده فعال هستند. نگاشت proguard برای این ردیابی‌ها توسط افزونه Gradle کامپایلر Compose از Kotlin 2.3.0 شروع می‌شود. ( Ifbcb5 )
  • رابط کاربری IdentifiableRecomposeScope برای ابزار اضافه کنید ( Idd5e0 ، b/434194620 )
  • از وقوع نامعتبرسازی‌های غیرضروری در ترکیب‌های شامل CompositionLocalContext ( I3fa21 ، b/412750209 ) جلوگیری شد.

رفع اشکالات

  • در مستندات و ابزارها توضیح داده شده است که کلیدهایی که برای نگهداری ارسال می‌شوند، خود نیز حفظ می‌شوند. از ارسال کلیدهایی که منجر به نشت حافظه می‌شوند، خودداری کنید. ( Ib553b ، b/177562901 )
  • مشکل برطرف شد و زمانی که تابع resume() مربوط به یک کامپوزیشن متوقف شده در یک ترد دیگر فراخوانی می‌شود، وضعیت اعلان‌های در حال انتظار ممکن است زمانی که ترد اصلی سعی می‌کند کامپوزیشن قابل توقف را برای فریم بعدی دوباره ترکیب کند، دچار اختلال شود. ( Ie5f17 , b/442649894 )
  • استثنائات ثبت‌شده در گزارش ترکیب. ( I47d78 ، b/432799675 ، b/436878515 ، b/359623674 ، b/400436355 )

نسخه ۱.۱۰.۰-آلفا۰۲

۲۷ آگوست ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-alpha02 منتشر شد. نسخه 1.10.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • @DoNotRetain اضافه شد که می‌تواند برای حاشیه‌نویسی انواعی که نباید با API retain استفاده شوند، احتمالاً به این دلیل که باعث نشت منابع می‌شوند، استفاده شود. ( Ie5435 )
  • پروژه‌هایی که با کاتلین ۲.۰ منتشر شده‌اند، برای استفاده به KGP ۲.۰.۰ یا جدیدتر نیاز دارند. ( IDb6b5 )

رفع اشکالات

  • محتوای متحرک اصلاح شد تا عملیات مربوط به Applier به درستی محاسبه شود، زمانی که محتوا، گره ریشه یک ترکیب را تغییر می‌دهد. هنگام محاسبه تغییرات برای محتوای متحرک، یک فراخوانی up() می‌تواند در انتظار بماند و به Applier ارسال نشود و باعث شود وضعیت Applier برای هرگونه استفاده بعدی به اشتباه در موقعیت قرار گیرد. ( I7c583 )، ( I47b70 )
  • CheckResult به عنوان منسوخ علامت‌گذاری می‌کند زیرا قرار نیست مورد استفاده قرار گیرد. ( I32934 )

نسخه ۱.۱۰.۰-آلفا۰۱

۱۳ آگوست ۲۰۲۵

androidx.compose.runtime:runtime-*:1.10.0-alpha01 منتشر شد. نسخه 1.10.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • API مربوط به retain را معرفی می‌کند. مانند rememberSaveable ، retain می‌تواند مقادیر به خاطر سپرده شده که سلسله مراتب ترکیب را ترک می‌کنند را حفظ کرده و ذخیره کند. مقادیر حفظ شده سریالی نمی‌شوند و طول عمر کوتاه‌تری نسبت به مقادیر ذخیره شده دارند و مشابه یک androidx ViewModel رفتار می‌کنند. برای جزئیات بیشتر به مستندات مراجعه کنید. ( Ia3105 ، b/177562901 )
  • یک API به awaitOrScheduleNextCompositionEnd() اضافه شده است که وقتی Recomposer نوشتن فریم فعلی را تمام می‌کند، یک فراخوانی مجدد (callback) صادر می‌کند. اگر Recomposer در حال حاضر در حال نوشتن فریمی نباشد، این API تا زمانی که نوشتن فریم بعدی تمام شود، به حالت تعلیق در می‌آید و فریم جدیدی را برای نوشتن زمان‌بندی می‌کند. ( Ib873c )
  • یک API ارائه دهنده محلی بدون واحد بازگشتی ترکیب ( I22521 ، b/271871288 ) اضافه کنید
  • یک ویژگی به isMovableContentUsageTrackingEnabled اضافه شد که امکان ردیابی استفاده از محتوای متحرک را فراهم می‌کند تا از ایجاد سربار در هنگام ایجاد اولیه محتوا جلوگیری شود. این ویژگی در حال حاضر به طور پیش‌فرض غیرفعال است. ( Ia713d )

رفع اشکالات

  • رفع مشکل از کار افتادن محتوای متحرک هنگام جابجایی بین زیرترکیب‌ها. ( I3fa1e ، b/436858107 )
  • اشکالی را برطرف کرد که در آن بخشی از ردیابی پشته قابل ترکیب، هنگام قرار گرفتن در چندین زیرترکیب تو در تو، از دست می‌رفت. ( I98c6f )
  • انتقال minSdk پیش‌فرض از API 21 به API 23 ( Ibdfca ، b/380448311 ، b/435705964 ، b/435705223 )
  • مشکل شرایط رقابتی که باعث می‌شد وضعیت داخلی یک ترکیب قابل مکث از چندین نخ به‌روزرسانی شود، برطرف شد ( I03895 )
  • ناظر ثبت ترکیب را که قرار است قبل از ترکیب اولیه فراخوانی شود، به‌روزرسانی می‌کند. ( I4adca ، b/430600932 )
  • رفع اشکال جزئی برای سازگاری AutoboxingStateValuePropertyDetector با K1 و K2. ( Ie81c1 )

مشارکت خارجی

  • مصنوع runtime-rxjava2 را چندسکویی کنید و JVM را به عنوان یک هدف پشتیبانی شده اضافه کنید. ( I5409e )
  • مصنوع runtime-rxjava3 را چندسکویی کنید و JVM را به عنوان یک هدف پشتیبانی شده اضافه کنید. ( I97e84 )

نسخه ۱.۹

نسخه ۱.۹.۴

۲۲ اکتبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.4 منتشر شد. نسخه ۱.۹.۴ شامل این کامیت‌ها است.

نسخه ۱.۹.۳

۸ اکتبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.3 منتشر شد. نسخه ۱.۹.۳ شامل این کامیت‌ها است.

نسخه ۱.۹.۲

۲۴ سپتامبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.2 منتشر شد. نسخه ۱.۹.۲ شامل این کامیت‌ها است.

نسخه ۱.۹.۱

۱۰ سپتامبر ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.1 منتشر شد. نسخه ۱.۹.۱ شامل این کامیت‌ها است.

رفع اشکالات

  • از بازنویسی آثاری که در حال نگارش هستند، خودداری کنید. ( Iacb01 )
  • از دو بار مکث شدنِ محدوده‌های recompose جلوگیری کنید. ( I060b2 , b/431584881 )

نسخه ۱.۹.۰

۱۳ آگوست ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0 منتشر شد. نسخه ۱.۹.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۸.۰

  • بررسی‌های Lint که با Compose ارائه می‌شوند، اکنون به حداقل نسخه AGP 8.8.2 نیاز دارند. اگر نمی‌توانید AGP را ارتقا دهید، می‌توانید Lint را با استفاده از android.experimental.lint.version=8.8.2 (یا نسخه جدیدتر) در gradle.properties خود، به تنهایی ارتقا دهید. برای اجرای بررسی‌های Lint مربوط به Compose در داخل IDE، به Android Studio Ladybug یا جدیدتر نیاز است.
  • یک کتابخانه جدید برای حاشیه‌نویسی در زمان اجرا ایجاد شده است. این کتابخانه شامل تعاریف حاشیه‌نویسی بدون وابستگی به زمان اجرای Compose است، بنابراین می‌توان از ماژول‌های غیر Compose نیز استفاده کرد.
    • @Stable ، @Immutable و @StableMarker به runtime-annotation منتقل شده‌اند تا امکان حاشیه‌نویسی ماژول‌های غیر Compose فراهم شود.
    • @FrequentlyChangingValue و @RememberInComposition به runtime-annotation اضافه شده‌اند. @FrequentlyChangingValue اعلان‌هایی را که می‌توانند باعث ترکیب‌های مکرر شوند، علامت‌گذاری می‌کند و @RememberInComposition اعلان‌هایی را که باید در ترکیب به خاطر سپرده شوند، علامت‌گذاری می‌کند. بررسی‌های lint مربوطه، استفاده نادرست را هشدار می‌دهند.

نسخه ۱.۹.۰-rc01

۳۰ ژوئیه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-rc01 منتشر شد. نسخه 1.9.0-rc01 شامل این کامیت‌ها است.

رفع اشکالات

  • ناظر ثبت ترکیب را که قرار است قبل از ترکیب اولیه فراخوانی شود، به‌روزرسانی می‌کند. ( I4adca ، b/430600932 )

نسخه ۱.۹.۰-بتا۰۳

۱۶ ژوئیه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-beta03 منتشر شد. نسخه 1.9.0-beta03 شامل این کامیت‌ها است.

نسخه ۱.۹.۰-بتا۰۲

۲ ژوئیه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-beta02 منتشر شد. نسخه 1.9.0-beta02 شامل این کامیت‌ها است.

رفع اشکالات

  • طول عمر مرجع مقادیر در جدول اسلات بین ترکیبات کاهش یافته است. مواردی وجود دارد که یک مرجع در یک جدول اسلات می‌تواند بیش از حد لازم در یک فریم دوام بیاورد. ( I49e74 , b/418516940 )
  • حذف ماژول کاتلین برای متدهای بارگذاری مجدد در حین کار ( Ic56a3 ، b/426871325 )

نسخه ۱.۹.۰-بتا۰۱

۱۸ ژوئن ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-beta01 منتشر شد. نسخه 1.9.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • یک API ابزاری برای تجزیه اطلاعات منبع اضافه شده توسط کامپایلر Compose اضافه شد. ( Iceaf9 ، b/408492167 )
  • SnapshotStateSet اکنون Parcelable در اندروید پیاده‌سازی می‌کند، اکنون پشتیبانی می‌شود که به عنوان بخشی از rememberSaveable { ... } استفاده شود. ( I755dd , b/378623803 )
  • SnapshotStateList اکنون Parcelable در اندروید پیاده‌سازی می‌کند، اکنون پشتیبانی می‌شود که به عنوان بخشی از rememberSaveable { ... } استفاده شود. ( Id18be ، b/378623803 )
  • movableContentOf() اکنون با حاشیه‌نویسی @RememberInComposition علامت‌گذاری شده است، که به lint اجازه می‌دهد تا کاربردهای نادرست را تشخیص دهد ( I2738d )
  • API ناظران ترکیب تجربی به‌روزرسانی شد تا امکان مشاهده جامع‌تر علل بازترکیب فراهم شود ( I32b6a )
  • برای در نظر گرفتن توسعه‌های آینده این ویژگی، setDiagnosticStackTraceEnabled به آزمایشی تغییر دهید. ( I11db3 )
  • currentCompositeKeyHash اکنون منسوخ شده است. به جای آن از currentCompositeKeyHashCode استفاده کنید. API جایگزین، هش یکسانی را با بیت‌های بیشتر رمزگذاری می‌کند، که به صورت نمایی احتمال اینکه دو گروه تصادفی نامرتبط در سلسله مراتب ترکیب، کلید هش یکسانی داشته باشند را کاهش می‌دهد. ( I4cb6a , b/177562901 )
  • پروژه‌های منتشر شده با کاتلین ۲.۰ برای استفاده به KGP 2.0.0 یا جدیدتر نیاز دارند ( Idb6b5 )
  • @Stable ، @Immutable و @StableMarker به runtime-annotation (به روشی سازگار) منتقل شده‌اند. اکنون می‌توانید در صورت تمایل به استفاده از این annotationها از کتابخانه‌هایی که به compose وابسته نیستند، به runtime-annotation وابسته باشید. ( I23a16 )
  • نام سربار rememberSaveable که یک KSerializer را می‌پذیرد، به rememberSerializable تغییر یافت. این تغییر، کاربرد مورد نظر آن را با kotlinx.serialization روشن می‌کند. پشتیبانی مستقیم از کلاس‌های عمومی kotlinx.Serializable در rememberSaveable به یک پارامتر نوع reified نیاز دارد که با الزام همه سایت‌های فراخوانی به ارائه اطلاعات نوع اصلاح‌شده در زمان کامپایل، سازگاری منبع را از بین می‌برد. ( Idb875 ، I38627 ، b/376028110 )

رفع اشکالات

  • کامپوزیشن‌هایی که با محتوای قابل مکث تنظیم شده و لغو شده‌اند، باید دور ریخته شوند. این مورد اکنون توسط کامپوزیشن بررسی می‌شود و در صورت استفاده مجدد، آن را دور می‌اندازد. ( I2daa5 ، b/406792785 )
  • ترکیب مکث‌دار اصلاح شد تا دیگر پیام جعلی onForgotten برای به خاطر سپردن مشاهده‌گرها هنگام حذف ترکیب مکث‌دار ارسال نشود. RememberObservers در یک ترکیب مکث‌دار لغو شده، فقط باید یک onAbandoned ارسال شود. ( I26f54 )
  • مشکل محتوای متحرک که در آن نامعتبرسازی‌هایی که در مراحل پایانی پردازش محتوای متحرک می‌رسند به آهنگساز اضافه می‌شوند اما این نامعتبرسازی‌ها هنگام جابجایی محتوا به‌روزرسانی نمی‌شوند و باعث می‌شوند محتوا در جای نادرستی مجدداً ترکیب شود، برطرف شد. ( Icd2fa ، b/409439507 )
  • مشکلی که باعث می‌شد محتوای قابل جابجایی پس از تشکیل اما قبل از جابجایی نامعتبر شود، برطرف شد. ( I99eac , b/229001114 )
  • فراخوانی تابع remove() از یک تکرارکننده لیست که توسط SnapshotStateList پس از فراخوانی previous() تولید شده است، می‌تواند عنصر اشتباهی را از لیست حذف کند و با کاری که ArrayList برای همان توالی فراخوانی‌ها انجام می‌دهد، مطابقت نداشته باشد. ( I05ab7 , b/417493222 )
  • مشکل ترتیب ارسال onForgotton که می‌توانست، برای مثال، باعث شود onDispose افکت‌های یکبار مصرف به ترتیب اشتباه اجرا شوند، برطرف شد. ( Ic1c91 ، b/417450712 )
  • رفع مشکل استفاده مجدد از مدیریت حالت در ترکیب قابل مکث ( Ife96e ، b/404058957 )
  • مشکل حالت استفاده مجدد هنگام مکث و شروع مجدد یک ترکیب برطرف شد، اما برخی از حالت‌های قبلاً متوقف شده نیاز به ترکیب مجدد داشتند زیرا برخی از حالت‌هایی که خوانده می‌شدند هنگام مکث ترکیب تغییر می‌کردند. ( I441d1 ، b/416209738 )
  • تکمیل ترکیب قابل مکث، رفع مشکل ارسال به خاطر سپردن برای مشکل b/404058957، رفع مشکل قبلی ناقص بود. ( I1afd4 ، b/404058957 )
  • OffsetApplier اکنون به درستی apply() که با ترکیب قابل مکث معرفی شده بود، لغو می‌کند. عدم وجود این ویژگی می‌تواند باعث شود ترکیب قابل مکث هنگام به‌روزرسانی گره‌های مجازی، استثنا ایجاد کند. ( Idbf31 ، b/409291131 )
  • مشکل بن‌بستی که ممکن بود کاربران Molecule را تحت تأثیر قرار دهد، زمانی که یک فراخوانی معلق به FrameClock.withFrameNanos در حین ارسال یک فریم لغو می‌شد، برطرف شد. ( I89cab ، b/407027032 )
  • Recomposer می‌تواند با محتوای متحرک غیرفعال شود ( Ie5416 ، b/409267170 )
  • ترتیبی که onReuse و onDeactivate می‌توانند در طول ترکیب قابل مکث معکوس شوند. اکنون تضمین شده است که آنها به ترتیب onDeactivate / onReuse رخ می‌دهند. ( I996e4 ، b/404058957 )
  • رفع مشکل ارسال ناظران یادآوری در ترکیب قابل مکث برای جلوگیری از ارسال موارد به خاطر سپرده شده/فراموش شده در یک درخواست ( I570b2 ، b/404645679 ، b/407931790 )
  • برای غیرفعال کردن بررسی‌های MainThread و رفع مشکلات مربوط به threading، LifecycleRegistry را در Compose Multiplatform به حالت ناامن تغییر دادم. برای جزئیات بیشتر به CMP-8227 مراجعه کنید. ( Icee87 )

مشارکت خارجی

  • اشکالی که کاربران Molecule را تحت تأثیر قرار می‌داد و در آن استفاده RecompositionMode.Immediate می‌توانست باعث از دست رفتن recompositionها شود، برطرف شد. ( I9f3a9 ، b/419527812 )
  • دریافت‌کننده‌های isApplied و isCancelled PausableComposition که امکان بررسی وضعیت PausableComposition را فراهم می‌کنند، در معرض نمایش قرار دارند ( I994aa ).
  • AnnotationTarget.FUNCTION به حاشیه‌نویسی FunctionKeyMeta اضافه شد. ( I08021 )

نسخه ۱.۹.۰-آلفا۰۴

۴ ژوئن ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-alpha04 منتشر شد. نسخه 1.9.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • SnapshotStateSet اکنون Parcelable را در اندروید پیاده‌سازی می‌کند، اکنون پشتیبانی می‌شود که به عنوان بخشی از rememberSaveable { ... } استفاده شود. ( I755dd , b/378623803 )
  • SnapshotStateList اکنون Parcelable را در اندروید پیاده‌سازی می‌کند، اکنون پشتیبانی می‌شود که به عنوان بخشی از rememberSaveable { ... } استفاده شود. ( Id18be ، b/378623803 )
  • movableContentOf() اکنون با حاشیه‌نویسی @RememberInComposition علامت‌گذاری شده است، که به lint اجازه می‌دهد تا کاربردهای نادرست را تشخیص دهد ( I2738d )
  • API ناظران ترکیب تجربی به‌روزرسانی شد تا امکان مشاهده جامع‌تر علل بازترکیب فراهم شود ( I32b6a )

رفع اشکالات

  • مشکل ترتیب ارسال onForgotton که می‌توانست، برای مثال، باعث شود onDispose افکت‌های یکبار مصرف به ترتیب اشتباه اجرا شوند، برطرف شد. ( Ic1c91 ، b/417450712 )
  • رفع مشکل استفاده مجدد از مدیریت حالت در ترکیب قابل مکث ( Ife96e ، b/404058957 )
  • رفع اشکال جزئی برای سازگاری تشخیص مجموعه‌های تغییرپذیر برای K1 و K2 ( Ie4878 )
  • رفع اشکال جزئی برای ایجاد امکان جستجوی حاشیه‌نویسی در دسترسی‌های ویژگی لغو شده برای K1 و K2 ( I9900d )

مشارکت خارجی

  • اشکالی که کاربران Molecule را تحت تأثیر قرار می‌داد و در آن استفاده RecompositionMode.Immediate می‌توانست باعث از دست رفتن recompositionها شود، برطرف شد. ( I9f3a9 ، b/419527812 )
  • دریافت‌کننده‌های isApplied و isCancelled PausableComposition که امکان بررسی وضعیت PausableComposition را فراهم می‌کنند، در معرض نمایش قرار دارند ( I994aa ).

نسخه ۱.۹.۰-آلفا۰۳

۲۰ مه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-alpha03 منتشر شد. نسخه 1.9.0-alpha03 شامل این کامیت‌ها است.

تغییرات API

  • برای در نظر گرفتن توسعه‌های آینده این ویژگی، setDiagnosticStackTraceEnabled به آزمایشی تغییر دهید. ( I11db3 )

رفع اشکالات

  • مشکل حالت استفاده مجدد هنگام مکث و شروع مجدد یک ترکیب برطرف شد، اما برخی از حالت‌های قبلاً متوقف شده نیاز به ترکیب مجدد داشتند زیرا برخی از حالت‌هایی که خوانده می‌شدند هنگام مکث ترکیب تغییر می‌کردند. ( I441d1 ، b/416209738 )
  • تکمیل ترکیب قابل مکث، رفع مشکل ارسال به خاطر سپردن برای مشکل b/404058957، رفع مشکل قبلی ناقص بود. ( I1afd4 ، b/404058957 )
  • SaveableStateHolder.SaveableStateProvider اکنون از طریق ترکیب، یک LocalSavedStateRegistryOwner برای محتوای خود فراهم می‌کند. ( Ia2761 ، b/413108878 )
  • androidx.compose.runtime.saveable اکنون به androidx.lifecycle.runtime.compose بستگی دارد. ( I53228 ، b/413108878 )

نسخه ۱.۹.۰-آلفا۰۲

۷ مه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-alpha02 منتشر شد. نسخه 1.9.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • rememberSaveable با یک 'key' سفارشی منسوخ شده است. این ویژگی، محدوده‌بندی موقعیتی را دور می‌زند و منجر به اشکالات حالت و رفتار متناقض می‌شود (مثلاً، اشتراک‌گذاری یا از دست دادن حالت ناخواسته، مشکلات در LazyLayouts تو در تو). لطفاً پارامتر 'key' را حذف کنید تا از محدوده‌بندی موقعیتی برای حالت سازگار و محدوده‌بندی محلی استفاده شود. برای جزئیات بیشتر به پیام کامل کامیت مراجعه کنید. ( I5e6ff ، b/357685851 )

رفع اشکالات

  • OffsetApplier اکنون به درستی apply() که با ترکیب قابل مکث معرفی شده بود، لغو می‌کند. عدم وجود این ویژگی می‌تواند باعث شود ترکیب قابل مکث هنگام به‌روزرسانی گره‌های مجازی، یک استثنا ایجاد کند. ( Idbf31 ، b/409291131 )
  • مشکل بن‌بستی که ممکن بود کاربران Molecule را تحت تأثیر قرار دهد، زمانی که یک فراخوانی معلق به FrameClock.withFrameNanos در حین ارسال یک فریم لغو می‌شد، برطرف شد. ( I89cab ، b/407027032 )
  • Recomposer می‌تواند در حالی که وضعیت محتوای متحرک هنوز در انتظار حذف شدن است، غیرفعال بماند. این اتفاق معمولاً رخ نمی‌دهد زیرا وضعیت محتوای متحرک در حلقه اصلی Recomposer حذف می‌شود. با این حال، این اتفاق می‌تواند در ترکیب قابل مکث رخ دهد، زمانی که محتوای متحرک در طول resume() حذف می‌شود ( Ie5416 , b/409267170 )
  • ترتیبی که onReuse و onDeactivate می‌توانند در طول ترکیب قابل مکث معکوس شوند. اکنون تضمین شده است که آنها به ترتیب onDeactivate/onReuse رخ می‌دهند. ( I996e4 ، b/404058957 )

نسخه ۱.۹.۰-آلفا۰۱

۲۳ آوریل ۲۰۲۵

androidx.compose.runtime:runtime-*:1.9.0-alpha01 منتشر شد. نسخه 1.9.0-alpha01 شامل این کامیت‌ها است.

تغییرات رفتاری

  • بررسی‌های Lint که با Compose ارائه می‌شوند، اکنون به حداقل نسخه AGP 8.8.2 نیاز دارند. اگر نمی‌توانید AGP را ارتقا دهید، می‌توانید Lint را با استفاده از android.experimental.lint.version=8.8.2 (یا نسخه جدیدتر) در gradle.properties خود، به تنهایی ارتقا دهید. برای اجرای بررسی‌های Lint در Compose در داخل IDE، به Android Studio Ladybug یا جدیدتر نیاز است.

تغییرات API

  • currentCompositeKeyHash اکنون منسوخ شده است. به جای آن از currentCompositeKeyHashCode استفاده کنید. API جایگزین، هش یکسانی را با بیت‌های بیشتر رمزگذاری می‌کند، که به صورت نمایی احتمال اینکه دو گروه تصادفی نامرتبط در سلسله مراتب ترکیب، کلید هش یکسانی داشته باشند را کاهش می‌دهد. ( I4cb6a , b/177562901 )
  • پروژه‌های منتشر شده با کاتلین ۲.۰ برای استفاده به KGP 2.0.0 یا جدیدتر نیاز دارند ( Idb6b5 )
  • @Stable ، @Immutable و @StableMarker به runtime-annotation (به روشی سازگار) منتقل شده‌اند. اکنون می‌توانید در صورت تمایل به استفاده از این annotationها از کتابخانه‌هایی که به compose وابسته نیستند، به runtime-annotation وابسته باشید. ( I23a16 )
  • onCreating و onDisposing را حذف می‌کند، زیرا منسوخ شده و به onPreCreate و onPreDispose تغییر نام داده‌اند. این تغییر، تغییر نام را کامل می‌کند. ( I97461 )
  • یک ترکیب محلی ارائه دهید که امکان پیوست کردن یک رد پشته ترکیب را بر اساس مکان گره ترکیب در ترکیب فراهم کند. ( Ie0bda ، b/354163858 )
  • معرفی ردیابی‌های پشته Compose تشخیصی بر اساس اطلاعات منبع ذخیره شده در composition. ( I3db9f ، b/354163858 )
  • runWithTimingDisabled به نفع runWithMeasurementDisabled منسوخ کنید، که رفتار را واضح‌تر توصیف می‌کند - همه معیارها متوقف می‌شوند. علاوه بر این، سوپرکلاس MicrobenchmarkScope در معرض دید قرار دهید زیرا تعریف مجدد تابع runWithMeasurementDisabled برای دسترسی آزاد امکان‌پذیر نیست، زیرا درون‌خطی است. ( I9e23b ، b/389149423 ، b/149979716 )
  • @FrequentlyChangingValue را اضافه می‌کند: یک حاشیه‌نویسی که می‌تواند توابع و دریافت‌کننده‌های ویژگی را علامت‌گذاری کند تا نشان دهد که نباید مستقیماً درون ترکیب فراخوانی شوند، زیرا این امر ممکن است باعث تغییر ترکیب‌های مکرر شود. به عنوان مثال، برای علامت‌گذاری مقادیر موقعیت اسکرول و مقادیر متحرک‌سازی. هشدارها توسط یک بررسی lint مربوطه ارائه می‌شوند. ( I83630 ، b/234042500 )
  • @RememberInComposition را اضافه می‌کند: یک حاشیه‌نویسی که می‌تواند سازنده‌ها، توابع و دریافت‌کننده‌های ویژگی را علامت‌گذاری کند تا نشان دهد که آنها نباید مستقیماً درون ترکیب فراخوانی شوند، بدون اینکه به خاطر سپرده شوند. خطاها توسط یک بررسی lint مربوطه ایجاد می‌شوند. این حاشیه‌نویسی می‌تواند برای علامت‌گذاری اعلان‌هایی که اشیاء stateful/mutable را برمی‌گردانند، اشیاء که حفظ هویت آنها در بین ترکیب‌ها مهم است، یا اشیاء که نمونه‌سازی آنها پرهزینه است و باید در بین ترکیب‌ها ذخیره شوند، استفاده شود. ( Ie7db0 )
  • یک overload جدید rememberSaveable اضافه شده است که KSerializer برای حفظ حالت ایمن از نوع با استفاده از سریال‌سازی KotlinX پشتیبانی می‌کند. API مبتنی بر Saver موجود همچنان پشتیبانی می‌شود. ( Iea4ab ، b/376028110 )

رفع اشکالات

  • رفع مشکل ارسال ناظران یادآوری در ترکیب قابل مکث برای جلوگیری از ارسال موارد به خاطر سپرده شده/فراموش شده در یک درخواست ( I570b2 ، b/404645679 ، b/407931790 )
  • متدهای onCreating مربوط به SnapshotObserver به onPreCreate و onDisposing به onPreDispose تغییر نام داده شده‌اند تا با دستورالعمل‌های API مطابقت داشته باشند. متدهای قبلی منسوخ شده‌اند و متدهای جدید به طور پیش‌فرض متدهای قدیمی را فراخوانی می‌کنند، بنابراین پیاده‌سازی‌های موجود این رابط تا زمانی که متدها حذف شوند، به کار خود ادامه خواهند داد. این متدها در نسخه آلفای ۱.۹.۰ در یک CL تکمیلی که به زودی پس از این نسخه منتشر خواهد شد، حذف خواهند شد. آن‌ها از نسخه بتای ۱.۸ قبل از نسخه پایدار ۱.۸ حذف خواهند شد. ( I6d753 )
  • مشکلی که باعث می‌شد مقادیر به خاطر سپرده شده هنگام ترکیب مجدد یک گروه حذف شده که پس از یک گروه قابل جابجایی ظاهر می‌شود، به اشتباه فراموش شده و دوباره محاسبه شوند، برطرف شد ( I62cab ، b/383769314 )
  • پشتیبانی از ردیابی پشته‌های نوشتن در LaunchedEffect و rememberCoroutineScope اضافه شد ( I705c0 ، b/354163858 )
  • بررسی‌های lint در Compose اکنون به حداقل نسخه AGP 8.8.2 از خط فرمان و حداقل Android Studio Ladybug برای پشتیبانی از IDE نیاز دارند. اگر از نسخه قدیمی‌تر AGP استفاده می‌کنید، می‌توانید android.experimental.lint.version=8.8.2 در gradle.properties تنظیم کنید تا نسخه Lint را بدون تأثیر بر AGP ارتقا دهید. ( I6f2a8 )

مشارکت خارجی

  • AnnotationTarget.FUNCTION به حاشیه‌نویسی FunctionKeyMeta اضافه شد. ( I08021 )

نسخه ۱.۸

نسخه ۱.۸.۳

۱۸ ژوئن ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.3 منتشر شد. نسخه ۱.۸.۳ شامل این کامیت‌ها است.

نسخه ۱.۸.۲

۲۰ مه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.2 منتشر شد. نسخه ۱.۸.۲ شامل این کامیت‌ها است.

نسخه ۱.۸.۱

۷ مه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.1 منتشر شد. نسخه ۱.۸.۱ شامل این کامیت‌ها است.

نسخه ۱.۸.۰

۲۳ آوریل ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0 منتشر شد. نسخه ۱.۸.۰ شامل این کامیت‌ها است.

نسخه ۱.۸.۰-rc03

۹ آوریل ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-rc03 منتشر شد. نسخه 1.8.0-rc03 شامل این کامیت‌ها است.

نسخه ۱.۸.۰-rc02

۲۶ مارس ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-rc02 منتشر شد. نسخه 1.8.0-rc02 شامل این کامیت‌ها است.

نسخه ۱.۸.۰-rc01

۱۲ مارس ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-rc01 منتشر شد. نسخه 1.8.0-rc01 شامل این کامیت‌ها است.

تغییرات API

  • متدهای onCreating مربوط به SnapshotObserver به onPreCreate و onDisposing به onPreDispose تغییر نام داده شده‌اند تا با دستورالعمل‌های API مطابقت داشته باشند. متدهای قبلی منسوخ شده‌اند و متدهای جدید به طور پیش‌فرض متدهای قدیمی را فراخوانی می‌کنند، بنابراین پیاده‌سازی‌های موجود این رابط تا زمانی که متدها حذف شوند، به کار خود ادامه خواهند داد. این متدها در نسخه آلفای ۱.۹.۰ در یک CL تکمیلی که به زودی پس از این نسخه منتشر خواهد شد، حذف خواهند شد. آن‌ها از نسخه بتای ۱.۸ قبل از نسخه پایدار ۱.۸ حذف خواهند شد. ( I6d753 )

نسخه ۱.۸.۰-بتا۰۳

۲۶ فوریه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-beta03 منتشر شد. نسخه 1.8.0-beta03 شامل این کامیت‌ها است.

نسخه ۱.۸.۰-بتا۰۲

۱۲ فوریه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-beta02 منتشر شد. نسخه 1.8.0-beta02 شامل این کامیت‌ها است.

رفع اشکالات

  • استثنای گرفتار شده در ترکیب قابل مکث را دوباره پرتاب کنید. ( 384486d )

نسخه ۱.۸.۰-بتا۰۱

۲۹ ژانویه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-beta01 منتشر شد. نسخه 1.8.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • مشکلی را برطرف می‌کند که در آن، بالا آوردن یک شیء پرتابی در طول ترکیب که از Exception امتداد نمی‌یابد، ممکن است منجر به خطای «ترکیب در حال انتظار اعمال نشده است» شود. ( I356be ، b/382094412 )

نسخه ۱.۸.۰-آلفا۰۸

۱۵ ژانویه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.8.0-alpha08 منتشر شد. نسخه 1.8.0-alpha08 شامل این کامیت‌ها است.

نسخه ۱.۸.۰-آلفا۰۷

۱۱ دسامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha07 منتشر شد. نسخه 1.8.0-alpha07 شامل این کامیت‌ها است.

تغییرات API

  • API ابزاری اضافه شده است که به بازرس طرح‌بندی کمک می‌کند تا در مواردی که از یک گره برای اتصال ترکیب‌ها به یکدیگر استفاده نمی‌شود، زیرترکیب‌ها را با ترکیب والد مرتبط کند. ( I4ce3d )
  • ثابت‌های محاسباتی و ویژه SnapshotId به جای عمومی، داخلی کردیم. در صورت لزوم، می‌توان محاسبات را روی یک SnasphotId با تبدیل آن به Int یا Long به ترتیب با استفاده از toInt() یا toLong() انجام داد. ( Ic3a57 )

مشارکت خارجی

  • بهینه‌سازی فضای ذخیره‌سازی برای پارامترهای movableContentOf . ( ed87177 )

نسخه ۱.۸.۰-alpha06

۱۳ نوامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha06 منتشر شد. نسخه 1.8.0-alpha06 شامل این کامیت‌ها است.

تغییرات API

  • تغییرات در API PausableComposition . این تغییرات اساسی نسبت به نسخه‌های قبلی 1.8.0-alpha (از 1.8.0-alpha02) اعمال می‌شوند، اما از آنجایی که این APIها در 1.8.0 جدید هستند، سازگاری با نسخه‌های قبلی حفظ نشده است زیرا APIها هنوز در نسخه آلفا هستند. ( I39819 )
  • APIهای ابزاری را برای مشاهده ایجاد کامپوزیشن‌های جدید در یک Recomposer ( Iaeb7e ) اضافه می‌کند.
  • snapshotId از نوع Long به Snapshot اضافه شد و id منسوخ شد. شناسه snapshot از Int به Long تغییر یافت تا از سرریز شدن شناسه snapshot در سیستم‌هایی با نرخ فریم بسیار بالا و انیمیشن‌های طولانی مدت جلوگیری شود. این نوع به expect/actual تبدیل شد تا به این نوع اجازه دهد در پلتفرم‌هایی که نوع Long بومی ندارند، Int یا نوع دیگری باشد. پلتفرم‌هایی که Long بومی ندارند، مانند جاوا اسکریپت، باید از نرخ فریم بالا (بیش از 1000 FPS) که باعث سرریز Int تقریباً هر 24 روز یکبار می‌شود، اجتناب کنند. ( I38ac3 ، b/374821679 )

رفع اشکالات

نسخه ۱.۸.۰-آلفا۰۵

۳۰ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha05 منتشر شد. نسخه 1.8.0-alpha05 شامل این کامیت‌ها است.

رفع اشکالات

  • رفع مشکل سرریز پشته با اضافه کردن Int.MAX_VALUE به SnapshotIdSet ( b/370536104 , Ic4179f6 )
  • بهینه‌سازی‌های خرد زمان اجرا ( I50c60 )
  • به R8 اجازه دهید فراخوانی‌های اشکال‌زدایی runtimeCheck ( I8c44 ) را حذف کند.
  • به جای بازگشتی compoundKeyOf به صورت تکراری ( I5817f ) بسازید.

مشارکت خارجی

  • پیاده‌سازی پشته‌ها با لیست‌های مجموعه ( I7d47c )

نسخه ۱.۸.۰-آلفا۰۴

۱۶ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha04 منتشر شد. نسخه 1.8.0-alpha04 شامل این کامیت‌ها است.

بهبود عملکرد

  • شناسه عکس فوری برای رکوردهای حالت در سازنده ارائه دهید ( 85c00f )
  • برای جلوگیری از خطاهای تأیید کلاس، SnapshotState*** را Refactor کنید ( 6ee4a6 )
  • اصلاح قوانین R8 برای جلوگیری از throw inlining ( 5beb92 )
  • عملیات بهینه سازی خرد ( d73c5c )
  • بهینه‌سازی تخصیص‌های SynchronizedObject در JVM ( 2b043f )

نسخه ۱.۸.۰-آلفا۰۳

۲ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha03 منتشر شد. نسخه 1.8.0-alpha03 شامل این کامیت‌ها است.

بهبود عملکرد

  • ایجاد زمینه فرزند به صورت تنبل برای rememberCoroutineScope ( f61464 )
    • rememberCoroutineScope معمولاً برای راه‌اندازی کوروتین‌ها در پاسخ به رویدادهایی که پس از ترکیب رخ می‌دهند، استفاده می‌شود. در برخی سناریوها، این رویدادها ممکن است هرگز رخ ندهند و منجر به هزینه‌های اضافی ایجاد و لغو Job بدون هیچ فایده‌ای شوند.
    • کاری کنید که scope برگردانده شده توسط rememberCoroutineScope coroutineContext خود را هنگام دسترسی به صورت تنبل ایجاد کند و در صورت عدم استفاده از scope، از ایجاد job و لغو کامل آن جلوگیری شود.

Version 1.8.0-alpha02

۱۸ سپتامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha02 is released. Version 1.8.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Added PausableComposition which allows creating a subcomposition that can be paused during composition and and applied asynchronously to the composition. Compiler support is required for pausing which is currently in development. ( I3394b )

Version 1.8.0-alpha01

۴ سپتامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits .

Version 1.7

Version 1.7.8

۱۲ فوریه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.7.8 is released. Version 1.7.8 contains these commits .

Version 1.7.7

۲۹ ژانویه ۲۰۲۵

androidx.compose.runtime:runtime-*:1.7.7 is released. No changes from 1.7.6.

androidx.compose.runtime:runtime-*:1.7.6 is released. Version 1.7.6 contains these commits .

نسخه ۱.۷.۵

۳۰ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.5 is released. Version 1.7.5 contains these commits .

Version 1.7.4

۱۶ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.4 is released. Version 1.7.4 contains these commits .

Version 1.7.3

۲ اکتبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.3 is released. Version 1.7.3 contains these commits .

Version 1.7.2

۱۸ سپتامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.2 is released. Version 1.7.2 contains these commits .

Version 1.7.1

۱۰ سپتامبر ۲۰۲۴

  • No changes to Android artifacts. -desktop artifacts were removed and -jvmStubs and -linuxx64Stubs artifacts were added. None of these targets are meant to be used, they are placeholders to help Jetbrains Compose efforts.

نسخه ۱.۷.۰

۴ سپتامبر ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0 is released. Version 1.7.0 contains these commits .

Important changes since 1.6.0

  • Added the ability to provide a composition local that is computed based on the values of other composition locals either by default, using compositionLocalWithComputedDefault() or by supplying a lambda to use to compute the value by using providesComputed instead of provides .
  • The value of a composition local can be obtained by using the currentValue property of the composition local accessible from within the lambda computing the value. This is used instead of current which is only accessible in @Composable functions. ( Iadbc0 )
  • Newly created state objects are immediately accessible from other snapshots, including the global snapshot, with their initial state. Any subsequent modifications are not visible until the snapshot in which the object was created is applied.
  • The initial state of mutableStateOf() , as well as their primitive versions, is the value passed in as a parameter to mutableStateOf() . The initial state of mutableStateListOf() and mutableStateMapOf() is empty.
  • Added Snapshot.isInSnapshot and Snapshot.PreexistingSnapshotId that are used to enable a state object to support being immediately accessible from the global snapshot upon its creation.
  • Custom state objects can support being immediately accessible by following the pattern of changes made to the built-in snapshot objects. ( I84a17 )
  • Enable nonSkippingGroupOptimization for compose libraries. This causes the generated code for all non-restartable composable functions in androidx to be more efficient. In the future we plan to enable this by default. I( acbc08 )
  • Invalidate composable lambdas in subcompositions on the same frame. ( 98301c )
  • Call onRelease callback in the same order as onForgotten . ( 2cd790 )
  • Enable strong skipping mode ( ed1766 )
  • Make currentCompoundHashKey unique in more cases ( d4a872 )

Version 1.7.0-rc01

۲۱ آگوست ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits .

Version 1.7.0-beta07

۷ آگوست ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-beta07 is released. Version 1.7.0-beta07 contains these commits .

Version 1.7.0-beta06

۲۴ ژوئیه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-beta06 is released. Version 1.7.0-beta06 contains these commits .

Version 1.7.0-beta05

۱۰ ژوئیه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-beta05 is released. Version 1.7.0-beta05 contains these commits .

Version 1.7.0-beta04

۲۶ ژوئن ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-beta04 is released. Version 1.7.0-beta04 contains these commits .

Version 1.7.0-beta03

June 12, 2024

androidx.compose.runtime:runtime-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits .

Version 1.7.0-beta02

۲۹ مه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-beta02 is released. Version 1.7.0-beta02 contains these commits .

Version 1.7.0-beta01

May 14, 2024

androidx.compose.runtime:runtime-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits .

Version 1.7.0-alpha08

۱ مه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits .

Version 1.7.0-alpha07

۱۷ آوریل ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits .

ویژگی‌های جدید

  • Added the ability to provide a composition local that is computed based on the values of other composition locals either by default, using compositionLocalWithComputedDefault() or by supplying a lambda to use to compute the value by using providesComputed instead of provides .
  • The value of a composition local can be obtained by using the currentValue property of the composition local accessible from within the lambda computing the value. This is used instead of current which is only accessible in @Composable functions. ( Iadbc0 )

تغییرات API

  • Newly created state objects are immediately accessible from other snapshots, including the global snapshot, with their initial state. Any subsequent modifications are not visible until the snapshot in which the object was created is applied.
  • The initial state of mutableStateOf() , as well as their primitive versions, is the value passed in as a parameter to mutableStateOf() . The initial state of mutableStateListOf() and mutableStateMapOf() is empty.
  • Added Snapshot.isInSnapshot and Snapshot.PreexistingSnapshotId that are used to enable a state object to support being immediately accessible from the global snapshot upon its creation.
  • Custom state objects can support being immediately accessible by following the pattern of changes made to the built-in snapshot objects. ( I84a17 )

رفع اشکالات

  • Fixed merging of readObserver in nested snapshots. This caused nested derived states to under-invalidate when used inside a snapshotFlow . ( Idf138 )

Version 1.7.0-alpha06

۳ آوریل ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha06 is released. Version 1.7.0-alpha06 contains these commits .

رفع اشکالات

  • Fix provide single values handling providesDefault ( 538f45 )
  • Avoid a deadlock in the Recomposer accessing the frame clock ( 07e5c6 )

Version 1.7.0-alpha05

۲۰ مارس ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits .

رفع اشکالات

  • Clear late changes on deactivated composition ( 5950bc )

Version 1.7.0-alpha04

۶ مارس ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha04 is released. Version 1.7.0-alpha04 contains these commits .

بهبود عملکرد

  • Call Snapshot.current once per derived state evaluation ( ee7daf )
  • Read currentRecord once per observation in composition ( b882b2 )
  • Remove accidental iterator allocation in snapshotFlow ( 231e56 )
  • Enable nonSkippingGroupOptimization for compose libraries. This causes the generated code for all non-restartable composable functions in androidx to be more efficient. In the future we plan to enable this by default. I( acbc08 )

Version 1.7.0-alpha03

February 21, 2024

androidx.compose.runtime:runtime-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

تغییرات API

  • Introduce a replace groups to improve detecting changes ( 0941b5 )

بهبود عملکرد

  • Improve memory allocation when detecting changes ( 53e7fd )
  • Fix a memory leak in the composer ( 0e097d )
  • Use ScopeMap to pass invalidations when recomposing ( e19a7e )
  • Optimize invalidations map to only keep derived states ( f11c44 )
  • Replace IdentityArraySet usages with ScatterSet ( db572e )
  • Optimize removeScope in ScopeMap ( bb0530 )

Version 1.7.0-alpha02

۷ فوریه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

رفع اشکالات

  • Invalidate composable lambdas in subcompositions on the same frame. ( 98301c )
  • Call onRelease callback in the same order as onForgotten . ( 2cd790 )
  • Filter changed states that are not observed in snapshotFlow . ( 796b80 )

بهبود عملکرد

  • Modify snapshot observer in place when it is already transparent. ( f60f30 )
  • Optimize SnapshotIdSet.lowest() . ( 7ae149 )
  • Use an allocation-free fold() in SnapshotIdSet . ( 532b7d )
  • Remove iterator allocation ( 83f96b )

Version 1.7.0-alpha01

۲۴ ژانویه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

Performance Optimizations

  • Add the ability to create slots after a child group has been added ( b5960c )
  • Optimize recording modifications of snapshot states ( 28c3fe )
  • Enable strong skipping mode ( ed1766 )

رفع اشکالات

  • Account for default parameter meta in intrinsic remember ( 096665 )
  • Make currentCompoundHashKey unique in more cases ( d4a872 )
  • Realize groups when exiting inline function call ( 2a90fc )

Version 1.6

Version 1.6.8

June 12, 2024

androidx.compose.runtime:runtime-*:1.6.8 is released. Version 1.6.8 contains these commits .

Version 1.6.7

۱ مه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.7 is released. Version 1.6.7 contains these commits .

Version 1.6.6

۱۷ آوریل ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.6 is released. No changes since the last release.

Version 1.6.5

۳ آوریل ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.5 is released. Version 1.6.5 contains these commits .

Version 1.6.4

۲۰ مارس ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.4 is released. Version 1.6.4 contains these commits .

Version 1.6.3

۶ مارس ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.3 is released. Version 1.6.3 contains these commits .

Version 1.6.2

February 21, 2024

androidx.compose.runtime:runtime-*:1.6.2 is released. Version 1.6.2 contains these commits.

نسخه ۱.۶.۱

۷ فوریه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.1 is released. Version 1.6.1 contains these commits.

رفع اشکالات

  • Call onRelease callback in the same order as onForgotten . ( 2cd790 )
  • Filter changed states that are not observed in snapshotFlow . ( 796b80 )

نسخه ۱.۶.۰

۲۴ ژانویه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.0 is released. Version 1.6.0 contains these commits.

Important changes since 1.5.0

ویژگی‌های جدید

  • Re-throw exceptions that are swallowed during recomposition loop ( 4dff9a )

Performance Optimizations

  • Optimize recording modifications of snapshot states ( 28c3fe )
  • Optimize rememberSaveable ( f01d79 )
  • Defer re-reading derived states until changes are recorded ( f38099 )
  • Improve providing composition local values ( a337ea )

رفع اشکالات

  • Fix slot table memory leak ( 73fcfe )
  • Skip recomposition of subcompositions that will be removed. ( Ieeb99 , b/254645321 )
  • Only trigger RememberObserver lifecycles when it is stored in remember calculation. ( f6b4dc )
  • Restrict $dirty capture to inline lambdas. ( acfca0 )
  • Fix moveable content sometimes receiving the wrong composition locals. ( 035cd6 )

Version 1.6.0-rc01

۱۰ ژانویه ۲۰۲۴

androidx.compose.runtime:runtime-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Version 1.6.0-beta03

۱۳ دسامبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-beta03 is released. Version 1.6.0-beta03 contains these commits.

Version 1.6.0-beta02

۲۹ نوامبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.

Version 1.6.0-beta01

November 15, 2023

androidx.compose.runtime:runtime-*:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

تغییرات API

  • Propagate Certain stability values in annotation. (274a4c)

رفع اشکالات

  • Use referential policy for composition local scope state in context. (83361c)
  • Restrict $dirty capture to inline lambdas. (acfca0)
  • Fix moveable content sometimes receiving the wrong composition locals. (035cd6)
  • Use faster non-allocating hashmaps in RecomposeScopeImpl . (d79494)
  • Use ObjectIntMap in DerivedState . (21862e)
  • Use IntRef for int SnapshotThreadLocal in DerivedState . (04eaf4)

Version 1.6.0-alpha08

۱۸ اکتبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha08 is released. Version 1.6.0-alpha08 contains these commits.

رفع اشکالات

  • Only trigger RememberObserver lifecycles when it is stored in remember calculation. ( f6b4dc )
  • Improve allocations in invalidations list sorting. ( 954d63 )
  • Use new non-allocating maps in SnapshotStateObserver . ( 4303ce )
  • Clear invalidations when composition is deactivated. ( e001be )

Version 1.6.0-alpha07

۴ اکتبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha07 is released. Version 1.6.0-alpha07 contains these commits.

تغییرات API

  • SnapshotStateList is now marked as RandomAccess to enable the direct indexing version of list helpers to be used. ( I5210c , b/219554654 )

Version 1.6.0-alpha06

۲۰ سپتامبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha06 is released. Version 1.6.0-alpha06 contains these commits.

Version 1.6.0-alpha05

۶ سپتامبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha05 is released. Version 1.6.0-alpha05 contains these commits.

Version 1.6.0-alpha04

۲۳ آگوست ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha04 is released. Version 1.6.0-alpha04 contains these commits.

ویژگی‌های جدید

  • Re-throw exceptions that are swallowed during recomposition loop ( 4dff9a )

تغییرات API

  • Added a method to deactivate ReusableComposition , removing observations but keeping nodes in place. The deactivated composition can be activated again by calling setContent . ( Ib7f31 )
  • Add ReusableComposition interface for managing lifecycle and reuse of subcompositions. ( I812d1 , b/252846775 )

Version 1.6.0-alpha03

۹ آگوست ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

رفع اشکالات

  • Fix new CompositionLocalProvider optimization ( 3118e88 )
  • Correct how movable content nodes are disassembled. ( 5e3d59b )

Version 1.6.0-alpha02

۲۶ ژوئیه ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

New Features & Performance Enhancements

  • Optimize rememberSaveable ( f01d79 )
  • Defer re-reading derived states until changes are recorded ( f38099 )
  • Improve providing composition local values ( a337ea )
  • SideEffect is marked as @ExplicitGroupsComposable to avoid generating a group. ( I74815 )
  • Avoid comparing composition local maps on reuse ( 782071 )

تغییرات API

  • Added a special case overload for CompositionLocalProviders that avoids overhead used to make providing multiple values faster but is overhead when providing a single value. ( I6d640 , b/288169379 )

رفع اشکالات

  • Fix slot table memory leak ( 73fcfe )
  • Fix how we restore rememberSaveable when stateSaver returns null ( 90748c )

Version 1.6.0-alpha01

۲۱ ژوئن ۲۰۲۳

androidx.compose.runtime:runtime-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

رفع اشکالات

  • Skip recomposition of subcompositions that will be removed. ( Ieeb99 , b/254645321 )
  • Reduced allocations when applying snapshots. ( I65c09 )
  • Avoid calculating readableHash in DerivedState if snapshot wasn't modified ( 68c565 )

نسخه ۱.۵

Version 1.5.4

۱۸ اکتبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.4 is released. Version 1.5.4 contains these commits.

Version 1.5.3

۴ اکتبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.3 is released. Version 1.5.3 contains these commits.

نسخه ۱.۵.۲

September 27, 2023

androidx.compose.runtime:runtime-*:1.5.2 is released. Version 1.5.2 contains these commits.

نسخه ۱.۵.۱

۶ سپتامبر ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.1 is released. Version 1.5.1 contains these commits.

نسخه ۱.۵.۰

۹ آگوست ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0 is released. Version 1.5.0 contains these commits.

تغییرات API

  • Removed allocations in recomposition, color animations, and AndroidComposeView . ( Ib2bfa )
  • Added a @StateFactoryMarker annotation, to mark functions that create states and must be wrapped in a remember call. ( I64550 )
  • Add primitive versions of State and MutableState ( fb3d89 )
  • Added Snapshot.isApplyObserverNotificationPending ( I672a5 )
  • Added primitive versions of the State API, allowing Int, Long, Float, and Double values to be tracked in State objects without incurring penalties for autoboxing. Use the new factory methods mutableIntState(Int) , mutableFloatStateOf(Float) , etc in order to use these. ( I48e43 )

رفع اشکالات

  • Skip recomposition of subcompositions that will be removed. ( Ieeb99 , b/254645321 )
  • Don't retain snapshot reference in ComposerImpl ( 0206f7 )
  • Don't apply composition twice ( f5791b )
  • Ensure invalidation for non-initialized derived state values ( aa2a92 )
  • Call onEndChanges during composition dispose. ( 62cc8c )
  • Fix moving content into a sub-composition ( 4beb41 )
  • Fix potential deadlocks ( c1a425 and 8edce0 )
  • The recomposer created for an Android window will now only block calls to withFrameNanos instead of all composition when it receives an ON_STOP notification. This means windows associated with stopped activites will continue to recompose for data changes but the animations, or any other caller of withFrameNanos , will block. ( Id9e7f , b/240975572 )
  • Execute deactivation callbacks for LayoutNode before disposing effects 3784073
  • Fix changed flags for restarted lambdas ea81df9
  • Fix live edit regression for Composable with nodes 73fd4d8
  • ON_STOP should pause the frame clock broadcasts instead of composition ae276f1
  • Invalidate SnapshotStateObserver scopes for unchanged derived states 84d9b1c
  • Fix potential dead-lock when disposing compositions 28761fc
  • Fix moving content into a sub-composition 92d4156
  • Fix changed flags for restarted lambdas ( 8a03e9 )
  • Execute deactivation callbacks for LayoutNode before disposing effects ( 8b0fa4 )
  • Fix endToMarker() when ending node groups. ( d71d980 )
  • Use current SlotWriter group for check on deactivation ( a0b518b )
  • Remove the fill in SlotTable.moveSlotGapTo() and move it to close ( 81f9935 )
  • Fix missing invalidations while movable content is moving ( 1d7c024 )
  • Fix immediate invalidations for moved movable content ( 8676618 )

بهبود عملکرد

  • Avoid calculating readableHash in DerivedState if snapshot wasn't modified. ( 307102 )
  • Reduced allocations ( I65c09 , d7ea77 , 727974 , and 445808 )
  • Quick cancellation of compose CoroutineScopes ( a55362 and bd382f )
  • Overwrite records of state objects with inaccessible state records ( c986960 )
  • Use composer of the correct scope when realizing groups ( 9a5e5b6 )
  • Use IdentityArraySet to store snapshot invalidations ( 7f60cca )
  • Reduce allocations for snapshot observations ( 5bc535f )

Version 1.5.0-rc01

۲۶ ژوئیه ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.

رفع اشکالات

  • Defer re-reading derived states until changes are recorded ( f38099 )

  • An optional inspection to recommend migrating mutableStateOf() calls to their corresponding specialized types for primitives is available. Its lint ID is AutoboxingStateCreation . Previously, this inspection was enabled by default for all projects. To see this warning in Android Studio's editor and your project's lint outputs, change its severity from informational to warning (or higher) by declaring warning "AutoboxingStateCreation" inside your module's build.gradle or build.gradle.kts configuration as shown ( I34f7e ):

        android {
            lint {
                warning "AutoboxingStateCreation"
            }
            ...
        }
    

Version 1.5.0-beta03

۲۸ ژوئن ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-beta03 is released. Version 1.5.0-beta03 contains these commits.

رفع اشکالات

  • Skip recomposition of subcompositions that will be removed. ( Ieeb99 , b/254645321 )

Version 1.5.0-beta02

۷ ژوئن ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.

بهبود عملکرد

  • Avoid calculating readableHash in DerivedState if snapshot wasn't modified. ( 307102 )

Version 1.5.0-beta01

May 24, 2023

androidx.compose.runtime:runtime-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

تغییرات API

  • Removed allocations in recomposition, color animations, and AndroidComposeView ( Ib2bfa )
  • Added a @StateFactoryMarker annotation, to mark functions that create states and must be wrapped in a remember call. ( I64550 )
  • Add primitive versions of State and MutableState ( fb3d89 )
  • Added Snapshot.isApplyObserverNotificationPending ( I672a5 )

رفع اشکالات

  • Reduced allocations ( I65c09 , d7ea77 , 727974 , and 445808 )
  • Don't retain snapshot reference in ComposerImpl ( 0206f7 )
  • Quick cancellation of compose CoroutineScopes ( a55362 and bd382f )
  • Don't apply composition twice ( f5791b )
  • Ensure invalidation for non-initialized derived state values ( aa2a92 )
  • Call onEndChanges during composition dispose. ( 62cc8c )
  • Fix moving content into a sub-composition ( 4beb41 )
  • Fix potential deadlocks ( c1a425
  • ON_STOP should pause the frame clock broadcasts instead of composition ( f4a2d1 )
  • Fix changed flags for restarted lambdas ( 8a03e9 )
  • Execute deactivation callbacks for LayoutNode before disposing effects ( 8b0fa4 )

External Contribution

  • Added Snapshot.isApplyObserverNotificationPending ( I672a5 )

Version 1.5.0-alpha04

۱۰ مه ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits.

تغییرات API

  • Added primitive versions of the State API, allowing Int, Long, Float, and Double values to be tracked in State objects without incurring penalties for autoboxing. Use the new factory methods mutableIntState(Int) , mutableFloatStateOf(Float) , etc in order to use these. ( I48e43 )

رفع اشکالات

  • Call onEndChanges during composition dispose. Focus nodes removed during Composition.dispose are subscribing to onEndChanges to reset focus.( 03d4a47 )

  • Ensure invalidation for non-initialized derived state values. Each derived state is associated with a list of its dependencies in SnapshotStateObserver , used to invalidate scopes associated with derived state whenever dependency changes. The dependency change is registered on snapshot advance, which can happen after derived state read (due to the call to Snapshot.notifyObjectsInitialized() ).

    Previous derived state observation logic in SnapshotStateObserver was cleaning up old dependencies, then reading new value. This resulted in a race condition with invalidation happening in a cleaned up state, where dependency invalidation wasn't registered.

    This change reorders derived state read and dependency cleanup, ensuring that invalidation always happens in a valid state. ( c472be6 )

Version 1.5.0-alpha03

April 19, 2023

androidx.compose.runtime:runtime-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits.

تغییرات API

  • The recomposer created for an Android window will now only block calls to withFrameNanos instead of all composition when it receives an ON_STOP notification. This means windows associated with stopped activites will continue to recompose for data changes but the animations, or any other caller of withFrameNanos , will block. ( Id9e7f , b/240975572 )

رفع اشکالات

  • Fix potential deadlock in snapshot list and map 5c1a425
  • Execute deactivation callbacks for LayoutNode before disposing effects 3784073
  • Fix changed flags for restarted lambdas ea81df9
  • Fix live edit regression for Composable with nodes 73fd4d8
  • ON_STOP should pause the frame clock broadcasts instead of composition ae276f1
  • Invalidate SnapshotStateObserver scopes for unchanged derived states 84d9b1c
  • Fix potential dead-lock when disposing compositions 28761fc
  • Fix moving content into a sub-composition 92d4156

Version 1.5.0-alpha02

۵ آوریل ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Kotlin's getValue operator can now be composable ( f174f6e )

Bug Fixes, Performance Improvements

  • Overwrite records of state objects with inaccessible state records ( c986960 )
  • Use composer of the correct scope when realizing groups ( 9a5e5b6 )
  • Fix endToMarker() when ending node groups. ( d71d980 )
  • Use current SlotWriter group for check on deactivation ( a0b518b )
  • Use IdentityArraySet to store snapshot invalidations ( 7f60cca )
  • Remove the fill in SlotTable.moveSlotGapTo() and move it to close ( 81f9935 )
  • Fix missing invalidations while movable content is moving ( 1d7c024 )
  • Fix immediate invalidations for moved movable content ( 8676618 )
  • Reduce allocations for snapshot observations ( 5bc535f )

Version 1.5.0-alpha01

۲۲ مارس ۲۰۲۳

androidx.compose.runtime:runtime-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Adds Modifier.Node#coroutineScope to allow Modifier.Nodes to launch coroutines ( I76ef9 )
  • Allow Modifier.Nodes to read CompositionLocals by implementing the CompositionLocalConsumerModifierNode interface. ( Ib44df )

نسخه ۱.۴

Version 1.4.3

۳ مه ۲۰۲۳

androidx.compose.runtime:runtime-*:1.4.3 is released with no changes.

Version 1.4.2

April 19, 2023

androidx.compose.runtime:runtime-*:1.4.2 is released. Version 1.4.2 contains these commits.

رفع اشکالات

  • Fix potential deadlock in snapshot list and map 2eb6570

  • Adding content to a SnapshotStateList or SnapshotStateMap can encounter a deadlock if the modification is concurrent with a direct write to the state record. This was made significantly more likely to be encountered with the changes introduced by 93fcae828b that uses direct writes to release unused records.

  • The locks are now ordered in that a snapshot lock is never attempted to be taken when a map or list lock is held.

Version 1.4.1

۵ آوریل ۲۰۲۳

androidx.compose.runtime:runtime-*:1.4.1 is released. Version 1.4.1 contains these commits.

رفع اشکالات

  • Fix endToMarker() when ending node groups. d71d980

نسخه ۱.۴.۰

۲۲ مارس ۲۰۲۳

androidx.compose.runtime:runtime-*:1.4.0 is released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

  • Use initialized value from LiveData for first composition 3680e25
  • Add ComposeNodeLifecycleCallback to observe lifecycle of compose nodes. 8b6a258
  • Add parameterTypes property to ComposableMethod 7b6c7ad

Bug Fixes & Performance Improvements

  • Clear both scope indexes in SnapshotStateObserver 29f4a3e
  • Add groups needed in the body of unskippable lambdas 7d06752
  • Improve memory reference characteristics of Snapshot state 93fcae8
  • Remove boxing in composition local lookups 0875717
  • Use correct key for non-reusable nodes groups 6388d8d
  • Protect SnapshotStateObserver from recursive and concurrent applies 98cb6ba
  • Added a check-index-bounds check in the IdentityArraySet "get" method 35a77d3
  • Update compose module to use ViewTreeLifecycleOwner extensions 21c2122
  • Send apply notifications after Recomposer finishes frame. 98f2641
  • Fix index out of bounds crash when cancelling the Recomposer 8f8656f
  • Always force recompose if parent providers of Composition have changed 9526fcc
  • Recomposer tolerance for cancelled Jobs a55f7ed
  • Improve handling invalidations for large number of composers 9b7ed67
  • Fix generating closing groups for non-local returns b6f590c

Version 1.4.0-rc01

۸ مارس ۲۰۲۳

androidx.compose.runtime:runtime-*:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits.

رفع اشکالات

Version 1.4.0-beta02

۲۲ فوریه ۲۰۲۳

androidx.compose.runtime:runtime:1.4.0-beta02 and androidx.compose.runtime:runtime-saveable:1.4.0-beta02 are released. Version 1.4.0-beta02 contains these commits.

Version 1.4.0-beta01

۸ فوریه ۲۰۲۳

androidx.compose.runtime:runtime-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.

تغییرات API

  • ComposeNodeLifecycleCallback was added which allows to observe lifecycle of Compose nodes ( I3731b )
  • Added @TestOnly to Composer.disableSourceInformation() as this function is only safe to call in a test. ( I896c8 )

رفع اشکالات

  • Remove boxing in composition local lookups ( 62f66a )
  • Improve memory reference characteristics of Snapshot state ( dfb451 )

Version 1.4.0-alpha05

۲۵ ژانویه ۲۰۲۳

androidx.compose.runtime:runtime:1.4.0-alpha05 and androidx.compose.runtime:runtime-saveable:1.4.0-alpha05 are released. Version 1.4.0-alpha05 contains these commits.

تغییرات API

  • More type/nullability of inline/deprecated-hidden functions ( I24f91 )

Version 1.4.0-alpha04

January 11, 2023

androidx.compose.runtime:runtime-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits.

تغییرات API

  • TestMonotonicFrameClock now uses correct experimental annotation. ( I95c9e )

رفع اشکالات

  • Protect SnapshotStateObserver from recursive and concurrent applies ( d902fb )

Version 1.4.0-alpha03

۷ دسامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.

تغییرات API

  • adding a new public method to ComposableMethod class analogous to java.lang.reflect.Method#getParameterTypes() ( Iab0c3 )

رفع اشکالات

  • Snapshot apply notifications are now sent after the Recomposer finishes applying changes. ( Iad6c0 , b/222093277 )

Version 1.4.0-alpha02

۹ نوامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.

Version 1.4.0-alpha01

۲۴ اکتبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.

تغییرات API

  • SnapshotStateList and SnapshotStateMap now have explicit implementaions of toList() and toMap() , respectfully. These methods return their current content without peforming a copy as they return the internal immutable data used to store their content. This value can be used, for example, to produce a flow of values using snapshotFlow without requiring copying of the data. ( Ica2bd )

نسخه ۱.۳

Version 1.3.3

January 11, 2023

androidx.compose.runtime:runtime-*:1.3.3 is released. Version 1.3.3 contains these commits.

  • No changes since 1.3.2

Version 1.3.2

۷ دسامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.2 is released. Version 1.3.2 contains these commits.

رفع اشکالات

  • Updated to support androidx.compose.ui 1.3.2

Version 1.3.1

۹ نوامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.1 is released. Version 1.3.1 contains these commits.

نسخه ۱.۳.۰

۲۴ اکتبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0 is released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

Exception Handling / Live Edit Support

Composition Tracing

Composable Reflection APIs

Runtime Fixes

Snapshot System

Version 1.3.0-rc01

October 5, 2022

androidx.compose.runtime:runtime-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.

رفع اشکالات

  • Fixed ArrayIndexOutOfBoundsException coming from the slot table ( b/249076084 )

Version 1.3.0-beta03

۲۱ سپتامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0-beta03 is released. Version 1.3.0-beta03 contains these commits.

Behavior Breaking Change

  • The parameter to remember and rememberCoroutineScope where changed to be crossinline . This will report an error for early returns instead of allowing an early return which will cause a later internal error to be reported.
  • This change can potentially lead to new compiler errors to be reported requiring non-local returns to be removed from the lambdas passed to these functions. ( Ibea62 )

Version 1.3.0-beta02

۷ سپتامبر ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.

رفع اشکالات

Version 1.3.0-beta01

۲۴ آگوست ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

تغییرات API

  • A find method was added to CompositionData to allow developer tools using this API to quickly find a sub-group of composition using its identity. ( I5794f )

Version 1.3.0-alpha03

۱۰ آگوست ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.

Version 1.3.0-alpha02

July 27, 2022

androidx.compose.runtime:runtime-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.

تغییرات API

  • Re-added ComposerKt.traceEventStart(Int, String) for backwards compatibility ( I6e6de )

Version 1.3.0-alpha01

۲۹ ژوئن ۲۰۲۲

androidx.compose.runtime:runtime-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

تغییرات API

  • Moving utility functionality to runtime ( I4f729 )

نسخه ۱.۲

نسخه ۱.۲.۱

۱۰ آگوست ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.1 is released. Version 1.2.1 contains these commits.

رفع اشکالات

  • Fixed memory leak: dispose of nested snapshots created from transparent snapshots b/239603305

Version 1.2.0

July 27, 2022

androidx.compose.runtime:runtime-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Compose Runtime had a handful of features introduced in 1.2.0, along with many stabilizing bug fixes. The most significant new feature was the introduction of the movableContentOf API , which can be used to enable complex UX such as shared element transitions. The movableContentOf API converts a composable lambda into a lambda that moves it state, and corresponding nodes, to any new location it is called. When the previous call leaves the composition the state is temporarily preserved and if a new call to the lambda enters the composition then the state, and associated Nodes, are moved to the location of the new call. If no new call is added the state is removed permanently and remember observers are notified.

  • If a movableContentOf lambda is called multiple times in the same composition, new state and nodes are created for each call and, as calls leave the composition and new calls enter, the state is moved from the first leaving calls to the entering calls in the order they are called. All state not claimed by new calls is removed permanently.

  • In addition to this and a few other new features, much time was spent stabilizing the runtime and Snapshot state system. Various memory leaks were removed and code paths optimized.

  • A summarized list of the changes can be found below:

New Features in 1.2

Performance in 1.2

Bug Fixes in 1.2

Version 1.2.0-rc03

۲۹ ژوئن ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-rc03 is released. Version 1.2.0-rc03 contains these commits.

رفع اشکالات

  • Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state. This change only removes derived state instances if it is no longer observed by other scopes. ( b/236618362 )

Version 1.2.0-rc02

۲۲ ژوئن ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-rc02 is released. Version 1.2.0-rc02 contains these commits.

Version 1.2.0-rc01

۱۵ ژوئن ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.

تغییرات API

  • Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )

Version 1.2.0-beta03

۱ ژوئن ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-beta03 is released. Version 1.2.0-beta03 contains these commits.

Version 1.2.0-beta02

۱۸ مه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

Version 1.2.0-beta01

۱۱ مه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

ویژگی‌های جدید

  • This is the first beta release of 1.2!

تغییرات API

  • Added experimental Snapshot.unsafeEnter/unsafeLeave ( I108f3 )
  • Added experimental Snapshot.asContextElement() API ( Iff072 )
  • The @ComposableTarget annotation and annotations marked by @ComposableTargetMarker can now be used at the file scope using the @file prefix. Using a target annotation at the file scope will cause the compiler to assume all composable functions in the file are intended to be target the associated applier. For example, using @file:UiComposable declares that all @Composable functions target the Compose UI applier. A function that needs to target another applier must explicitly supply the target marker annotation for the desired applier. ( I40804 )

Version 1.2.0-alpha08

۲۰ آوریل ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.

تغییرات API

  • Added TracingInProgress to the CompositionTracer interface. ( Ic6f12 )
  • Add recomposeScopeIdentity to Composer ( I0c873 )
  • Restricted tracing APIs (Composer.setTracer) to OptIn(InternalComposeTracingApi) . ( I9187f )
  • Added ResuableContentHost which allows better control over the lifetime of state created for reusable content. For example, if a sub-composition is temporarily not in use then the content can be deactivated causing all the remembered state in the composition to be forgotten triggering, for example, all disposable effects. ( I2c0f2 , b/220322704 )

Version 1.2.0-alpha07

۶ آوریل ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits.

تغییرات API

  • New function Snapshot.withoutReadObservation { ... } was added. It allows users to run the passed lambda without subscribing to the changes of the state values read during this block. You could find it useful in use cases when you want to benefit from the snapshot based thread safe write/reads, but want to be able to read the value without causing unnecessary recomposition or remeasure. ( I9f365 , b/214054486 )

Version 1.2.0-alpha06

۲۳ مارس ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.

Version 1.2.0-alpha05

March 9, 2022

androidx.compose.runtime:runtime-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.

External Contribution

  • Updated to use Kotlinx coroutines 1.6.0 ( I3366d )

Version 1.2.0-alpha04

۲۳ فوریه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

تغییرات API

  • Added ComposableTarget , ComposableTargetMarker and ComposableOpenTarget that allows compile time reporting of when a composable function is called targeting an applier it was not designed to use.

    In most cases the annotations can be inferred by the compose compiler plugin so using these annotation directly should be rare . The cases that cannot be inferred include creating and using a custom applier, abstract composable functions (such as interface methods), fields or global variables that are composable lambdas (local variables and parameters are inferred), or when using ComposeNode or a related composable functions.

    For custom appliers the composable functions that calls ComposeNode or ReusableComposeNode need to add a CompoableTarget annotation for the function and any composable lambda parameter types. It is recommended, however, to create an annotation that is annotated with ComposableTargetMarker and then the marked annotation be used instead of ComposableTarget directly. A composable annotation marked with ComposableTargetMarker is equivalent to a ComposbleTarget with the fully qualified name of the attribute class as the applier parameter. For an example of using ComposableTargetMarker see anroidx.compose.ui.UiComposable . ( I38f11 )

Version 1.2.0-alpha03

۹ فوریه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

تغییرات API

  • Added movableContentOf which converts a composable lambda into a lambda that moves it state, and corresponding nodes, to any new location it is called. When the previous call leaves the composition the state is temporarily preserved and if a new call to the lambda enters the composition then the state, and associated nodes, are moved to the location of the new call. If no new call is added the state is removed permanently and remember observers are notified.

    If a movableContentOf lambda is called multiple times in the same composition, new state and nodes are created for each call and, as calls leave the composition and new calls enter, the state is moved from the first leaving calls to the entering calls in the order they are called. All state not claimed by new calls is removed permanently. ( Ib4850 )

  • Added a tracing API to composition to enable tools to provide more detailed tracing of composable functions. The compiler now generates calls to the tracing API which include source information. ( Ib0eb5 )

    To remove these calls and the associated source information from a release build, add the following Proguard rule:

      -assumenosideeffects public class androidx.compose.runtime.ComposerKt {
          boolean isTraceInProgress();
          void traceEventStart(int,java.lang.String);
          void traceEventEnd();
      }
    
  • Add InternalComposeScope which gives tools the ability to identify a composable during recompositions. ( I07a3f )

Version 1.2.0-alpha02

۲۶ ژانویه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

Version 1.2.0-alpha01

۱۲ ژانویه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

تغییرات API

  • Added identity field to CompositionData for generating invariant ids in the Layout Inspector. ( Ic116e )

Dependency Updates

  • Now depends on Kotlin 1.6.10 .

نسخه ۱.۱

نسخه ۱.۱.۱

۲۳ فوریه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.1.1 is released. Version 1.1.1 contains these commits.

رفع اشکالات

نسخه ۱.۱.۰

۹ فوریه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Stable support for the Android 12 Overscroll effect
  • Improvements to touch target sizing
  • Note that, with respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines for touch target size . For instance, Button touch target will expand to a minimum size of 48x48dp , even if you set the Button's size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.
  • Stable support for Navigation Rail
  • Graduates a number of previously experimental APIs to stable
  • Support for newer versions of Kotlin

Version 1.1.0-rc03

۲۶ ژانویه ۲۰۲۲

androidx.compose.runtime:runtime-*:1.1.0-rc03 is released. Version 1.1.0-rc03 contains these commits.

رفع اشکالات

  • Updated to support Compose Material 1.1.0-rc03

Version 1.1.0-rc01

۱۵ دسامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.

Version 1.1.0-beta04

۱ دسامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-beta04 is released. Version 1.1.0-beta04 contains these commits.

ویژگی‌های جدید

  • Updated to be compatible with Kotlin 1.6.0

Version 1.1.0-beta03

November 17, 2021

androidx.compose.runtime:runtime-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.

Version 1.1.0-beta02

۳ نوامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

تغییرات API

  • Snapshot code was split up into multiple files, but all still lives in the same JVM class. ( Ic6c98 )

Version 1.1.0-beta01

۲۷ اکتبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

Version 1.1.0-alpha06

۱۳ اکتبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

تغییرات API

  • Removed InternalCompilerApi from Composer methods that are required to be called cross-module ( I1aa0b )
  • Recomposer.state has been deprecated and replaced by Recomposer.currentState to change its type to a StateFlow ( Ic2ab3 , b/197773820 )

Version 1.1.0-alpha05

۲۹ سپتامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.

Version 1.1.0-alpha04

۱۵ سپتامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

Version 1.1.0-alpha03

۱ سپتامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

ویژگی‌های جدید

  • The Compose Compiler now supports older versions of the Compose Runtime (1.0). Prior to this change, the Compose Compiler was only compatible with the Compose Runtime of the same version or later. After this change, the Compose Compiler is compatible with an older version of the Compose Runtime (1.0). ( aosp/1796968 )
  • Updated Compose 1.1.0-alpha03 to depend on Kotlin 1.5.30 . ( I74545 )

Version 1.1.0-alpha02

۱۸ آگوست ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

Version 1.1.0-alpha01

۴ آگوست ۲۰۲۱

androidx.compose.runtime:runtime-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

نسخه ۱.۰

نسخه ۱.۰.۵

۳ نوامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.5 is released. Version 1.0.5 contains these commits.

رفع اشکالات

  • Fixed a crash tracking derivedStateOf instances. ( aosp/1792247 )

نسخه ۱.۰.۴

۱۳ اکتبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.4 is released. Version 1.0.4 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.31

نسخه ۱.۰.۳

۲۹ سپتامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.3 is released. Version 1.0.3 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.30

نسخه ۱.۰.۲

۱ سپتامبر ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.2 is released. Version 1.0.2 contains these commits.

Updated to support the Compose 1.0.2 release. Compose 1.0.2 is still compatible with Kotlin 1.5.21 .

نسخه ۱.۰.۱

۴ آگوست ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.1 is released. Version 1.0.1 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.21 .

نسخه ۱.۰.۰

۲۸ ژوئیه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0 is released. Version 1.0.0 contains these commits.

Major features of 1.0.0

This is the first stable release of Compose. Please see the official Compose Release blog for more details!

مشکلات شناخته شده

  • If you are using Android Studio Bumblebee Canary 4 or AGP 7.1.0-alpha04 / 7.1.0-alpha05 , you may hit the following crash:

      java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
    

    To fix, temporarily increase your minSdkVersion to 24+ in your build.gradle file. This issue will be fixed in the next version of Android Studio Bumblebee and AGP 7.1 . ( b/194289155 )

Version 1.0.0-rc02

۱۴ ژوئیه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-rc02 is released. Version 1.0.0-rc02 contains these commits.

  • Fixed race conditions in SnapshotStateObserver causing spurratic NullPointerExceptions. ( aosp/1763445 , aosp/1758105 , b/192677711 )
  • Fixed issues with runtime snapshots causing java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied crashes. ( b/193006595 , b/192570897 )

Version 1.0.0-rc01

۱ ژوئیه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.

Version 1.0.0-beta09

۱۶ ژوئن ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

Added Profile Rules

This release adds profile rules to the following compose modules ( I14ed6 ):

  • androidx.compose.animation
  • androidx.compose.animation-core
  • androidx.compose.foundation
  • androidx.compose.foundation-layout
  • androidx.compose.material
  • androidx.compose.material-ripple
  • androidx.compose.runtime
  • androidx.compose.ui
  • androidx.compose.ui.geometry
  • androidx.compose.ui.graphics
  • androidx.compose.ui.text
  • androidx.compose.ui.text
  • androidx.compose.ui.unit
  • androidx.compose.ui.util

What are profile rules?

  • Profile rules for a library are specified in a text file baseline-prof.txt located in the src/main or equivalent directory. The file specifies a rule per line, where a rule in this case is a pattern for matching to methods or classes in the library. The syntax for these rules is a superset of the human-readable ART profile format that is used when using adb shell profman --dump-classes-and-methods ... . These rules take one of two forms to target either methods or classes.

  • A method rule will have the following pattern:

    <FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
    
  • And a class rule will have the following pattern:

    <CLASS_DESCRIPTOR>
    
  • Here <FLAGS> is one or more of the characters H , S , and P to indicate whether or not this method should be flagged as "Hot", "Startup", or "Post Startup".

  • The <CLASS_DESCRIPTOR> is the descriptor for the class that the targeted method belongs to. For example, the class androidx.compose.runtime.SlotTable would have a descriptor of Landroidx/compose/runtime/SlotTable; .

  • The <METHOD_SIGNATURE> is the signature of the method, and includes the name, parameter types, and return types of the method. For example, the method fun isPlaced(): Boolean on LayoutNode has the signature isPlaced()Z .

  • These patterns can have wildcards ( ** , * , and ? ) in order to have a single rule encompass multiple methods or classes.

What do the rules do?

  • A method that has the flag H indicates that this method is a "hot" method, and should be compiled ahead of time.

  • A method that has the flag S indicates that it is a method which is called at startup, and should be compiled ahead of time to avoid the cost of compilation and interpreting the method at startup time.

  • A method that has the flag P indicates that it is a method which is called after startup.

  • A class that is present in this file indicates that it is used during startup and should be pre-allocated in the heap to avoid the cost of class loading.

این چطور کار می‌کند؟

  • Libraries can define these rules which will be packaged in AAR artifacts. When an app is then built which includes these artifacts, these rules are merged together and the merged rules are used to build a compact binary ART profile that is specific to the app. ART can then leverage this profile when the app is installed on devices in order to ahead-of-time compile a specific subset of the application to improve the performance of the application, especially the first run. Note that this will have no effect on debuggable applications.

Version 1.0.0-beta08

۲ ژوئن ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

تغییرات API

  • State<T> is now State<out T> ( I69049 )
  • ControlledComposition API change to enable recomposing changes in a recompose single pass. ( Iaafd1 , b/184173932 )

Version 1.0.0-beta07

۱۸ مه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

تغییرات API

  • Added new compose compiler APIs that allow the source information generated by the compiler to be removed during source minification. ( Ia34e6 )
  • Introduces ReusableContent which will attempt to reuse the nodes in its content instead of replacing them when the key is changed. When the key is changed the previous values in the slot table for the content is ignored except for the nodes that were generated and the values used to update the nodes.

    Introduces ReusableComposeNode that will reuse the node emitted instead of replacing it as is done for ComposeNode . ( I1dd86 )

  • @ComposeCompilerApi no longer @RequiresOptIn ( Iab690 )

رفع اشکالات

  • LazyColumn/Row will now keep up to 2 previously visible items active (not disposed) even when they are scrolled out already. This allows the component to reuse the active subcompositions when we will need to compose a new item which improves the scrolling performance. ( Ie5555 )

Version 1.0.0-beta06

۵ مه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • @ComposeCompilerApi no longer @RequiresOptIn ( Iab690 )

Version 1.0.0-beta05

۲۱ آوریل ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

تغییرات API

  • Removed @InternalComposeApi for recording snapshot reads and writes ( Id134d )

رفع اشکالات

  • The AndroidManifest files from ui-test-manifest and ui-tooling-data are now compatible with Android 12 ( I6f9de , b/184718994 )

Version 1.0.0-beta04

۷ آوریل ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

رفع اشکالات

  • Prior to this change, local composable functions were skippable based on their parameters. After this change, no local composable functions will skip. This change is done because it is common and expected for local functions to capture parameters from the parent and them skipping is a common source of bugs.

    To summarize, consider the example:

    @Composable fun Counter(count: Int, onCountChange: (Int) -> Unit) {
      @Composable fun ShowCount() { Text("Count: $count") }
      ShowCount()
      Button(onClick={ onCountChange(count + 1) }) {
        Text("Increment")
      }
    }
    

    Prior to this change, the ShowCount composable function would always skip, even after the count parameter was updated. This is no longer the case. ( I5648a )

  • Fixed the issue when rememberSaveable() was restoring the old value when used with input params ( I1b110 , b/182403380 )

Version 1.0.0-beta03

۲۴ مارس ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

تغییرات API

  • DefaultMonotonicFrameClock is deprecated. Calling withFrameNanos or Recomposer.runRecomposeAndApplyChanges with no MonotonicFrameClock will now throw IllegalStateException . ( I4eb0d )

Version 1.0.0-beta02

۱۰ مارس ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

رفع اشکالات

  • Enforce restrictions on public usage of experimental APIs ( I6aa29 , b/174531520 )
  • Fix for broken rememberSaveable { mutableStateOf(0) } when used inside a destination of navigation-compose. ( I1312b , b/180042685 , b/180701630 )

نسخه ۱.۰.۰-بتا۰۱

۲۴ فوریه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

This is the first release of Compose 1.0.0 Beta.

تغییرات API

  • Add Recomposer.runRecomposeConcurrentlyAndApplyChanges experimental API for recomposing invalidated compositions off the main frame loop. ( I342d0 )
  • Any composables marked with @ReadOnlyComposable are now compile-time validated to ensure that they only make calls to other @ReadOnlyComposables ( I58961 )
  • The defaultFactory for compositionLocalOf and staticCompositionLocalOf is now required instead of optional.

    This changes removes a potential type error for non-nullable types where no default factory was provided. Previously this would provide a null reference for a non-nullable type.

    For nullable types consider supplying { null } as the default factory.

    We do not recommend using locals with non-nullable types unless a sensible default can be provided. If no sensible default exists, the defaultFactory lambda should throw an exception. However throwing an exception means that consumers of the local will have an implicit dependency on it being provided that is not enforced by the type system. ( Ifbd2a )

  • Deprecated symbols were removed from the compose runtime ( I3252c )

  • Deprecated emptyContent() is removed. Use {} instead. ( Idb33f , b/179432510 )

  • Providers has been renamed to CompositionLocalProvider

    • The Composition constructor no longer accepts a key parameter, and has been deprecated.
    • currentCompositeKeyHash has been turned into a composable top level property instead of a composable top level function.
    • CompositionData and CompositionGroup have been moved to the androidx.compose.runtime.tooling namespace
    • ComposableLambda has been made an interface instead of a concrete class, and no longer has type parameters.
    • ComposableLambdaN has been made an interface instead of a concrete class, and no longer has type parameters.
    • The snapshotFlow function has been moved to the androidx.compose.runtime namespace
    • the merge method of SnapshotMutationPolicy is no longer experimental
    • The @TestOnly top level clearRoots function has been removed. It is no longer necessary.
    • keySourceInfoOf and resetSourceInfo functions have been removed. They are no longer necessary.
    • Composer.collectKeySourceInformation has been removed. It is no longer necessary.
    • isJoinedKey, joinedKeyLeft, and joinedKeyRight methods have been removed. They are no longer necessary.
    • Various top level APIs have been moved and reorganized into different files. Due to Kotlin's file class semantics, this will break binary compatibility but not source compatibility, so should not be an issue for most users.
    • ( I99b7d , b/177245490 )
  • SnapshotStateObserver is not Experimental anymore ( Id2e6a )

  • Deleted some previously deprecated APIs ( Ice5da , b/178633932 )

  • Made the following Material API changes:

    • Added contentPadding parameter to Top/BottomAppBar to allow customizing the default padding.
    • Reordered parameters in BackdropScaffold to follow API guidelines for required parameters being before optional parameters.
    • Moved icon parameter in BottomNavigationItem to be after selected and onClick .
    • Renamed alwaysShowLabels parameter in BottomNavigationItem to alwaysShowLabel .
    • Renamed bodyContent parameters in a few components to just content .
    • Reordered parameters in ButtonDefaults.buttonColors() . Please note that because the type of the parameters have not changed, this will not cause an error in your code - please ensure you are either using named parameters or update the ordering manually, otherwise your code will not work the same as previously.
    • Added secondaryVariant parameter to darkColors() . This color is typically the same as secondary in dark theme, but adding for consistency and further customization.
    • Removed ElevationDefaults and animateElevation() from the public API surface since they were not commonly used / useful.
    • Renamed onValueChangeEnd in Slider to onValueChangeFinished and made it nullable.
    • Renamed text parameter in Snackbar to content for consistency.
    • Added contentPadding parameter to DropdownMenuItem to allow customizing the default padding and made content be an extension on RowScope .
    • Renamed ModalDrawerLayout to ModalDrawer .
    • Renamed BottomDrawerLayout to BottomDrawer .
    • ( I1cc66 )

نسخه ۱.۰.۰-آلفا۱۲

۱۰ فوریه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

تغییرات API

  • Support for ViewGroups was removed from UiApplier. The Deprecated emitView composables were removed. ( Ifb214 )
  • CompositionReference renamed to CompositionContext ( I53fcb )
  • ComponentActivity.setContent has moved to androidx.activity.compose.setContent in the androidx.activity:activity-compose module. ( Icf416 )
  • Snapshot API was updated to be more consistent with API guideline as well as hiding internal implementation classes from the public API. ( Id9e32 )
  • Renamed Ambients to match the Ambient -> CompositionLocal rename. Ambients used to be named AmbientFoo, now CompositionLocals are named LocalFoo. ( I2d55d )
  • Renamed Ambient to CompositionLocal, and ambientOf / staticAmbientOf to compositionLocalOf / staticCompositionLocalOf respectively. This change helps to make the purpose of CompositionLocal more clear: a mechanism for providing / retrieving values local to a composition. CompositionLocal instances should be prefixed with Local , such as val LocalFoo = compositionLocalOf { Foo() }. ( Ia55b6 )
  • takeMutableSnapshot and takeSnapshot have moved to be companion methods of Snapshot. ( I91f19 )
  • @ComposableContract has been deprecated in favor of three more specific annotations.

    @ComposableContract(restartable = false) has become @NonRestartableComposable @ComposableContract(readonly = true) has become @ReadOnlyComposable @ComposableContract(preventCapture = true) has become @DisallowComposableCalls @ComposableContract(tracked = true) has been removed. ( I60a9d )

  • emptyContent() and (@Composable () -> Unit).orEmpty() utilities have been deprecated as they no longer have any positive performance impact or value ( I0484d )

  • snapshotFlow and withMutableSnapshot are no longer experimental ( I6a45f )

  • Recomposers can now be closed. Closed recomposers will continue recomposition until composition child coroutines complete. Recomposer.shutDown renamed to cancel to contrast with close. ( Ib6d76 )

  • The compose:runtime-dispatch artifact is now deprecated. MonotonicFrameClock can now be found in compose:runtime and AndroidUiDispatcher can be found in compose:ui. ( Ib5c36 )

  • The API the Compose compiler plugin targets has been refactored to use an interface instead of a concrete class. The interface also no longer uses a type parameter.

    This is an internal change that should not effect source code compatibility but is a binary breaking change. ( I3b922 , b/169406779 )

  • SnapshotMutableState was introduced ( Icfd03 )

  • DisposableEffectDisposable was renamed to DisposaleEffectResult ( Ica7c6 )

  • Removed Recomposer.current(). [Abstract]ComposeView now default to lazily created, window-scoped Recomposers driven by the ViewTreeLifecycleOwner for the window. Recomposition and withFrameNanos-based animation ticks are paused while the host Lifecycle is stopped. ( I38e11 )

  • Recomposer.runningRecomposers now offers a global StateFlow of read-only RecomposerInfo for observing ongoing composition state in the process. Prefer this API to Recomposer.current(), which is now deprecated. ( If8ebe )

  • DisposableEffectDisposable was renamed to DisposaleEffectResult ( I3ea68 )

نسخه ۱.۰.۰-آلفا۱۱

۲۸ ژانویه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

تغییرات API

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • The emit() API and all overloads have been deprecated and renamed to ComposeNode. The APIs are identical, just a different name in order to follow the naming conventions of Compose ( I4137b )
  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )
  • RememberObserver replaces CompositionLifecycleObserver and CompositionLifecycleObserver is now deprecated.

    RememberObserver is a replacement for CompositionLifecycleObserver with modified semantics and renamed methods. Changing to the new API can be done mechanically for objects that are only remembered once which is, and continues to be, the recommended practice. However, if a reference was remembered more than once in a composition onRemembered is called for each reference where onEnter is only called once. onEnter was called multiple time if the object was used in subcompositions, such as WithConstraints and Scaffold making the single onEnter call guarantee unreliable and it was removed for RememberObserver .

    RememberObserver adds onAbandoned which is called if the RememberObserver instance is returned from the callback passed to remember but was not remembered in the composition state and, therefore, will never have onRemembered called. This can occur if an exception terminates composition before completing or the composition is discarded because the state is was producing a composition for is no longer current or otherwise is no longer needed. If the instance of RememberObserver following the single reference recommendation above is tracking an external resource both onForgotten and onAbandoned each indicate that the resource is no longer needed. If the object is tracking work started or resources allocated in onRemembered , onAbandoned can be ignored as it will not be called if onRemembered is called. ( I02c36 )

  • Do not mark collectAsState() functions as inline ( Ia73e4 )

رفع اشکالات

  • WithConstraints was reworked as BoxWithConstraints and moved to foundation.layout. ( I9420b , b/173387208 )
  • Leverage TestCoroutineDispatcher in testing ( I532b6 )

نسخه ۱.۰.۰-آلفا۱۰

۱۳ ژانویه ۲۰۲۱

androidx.compose.runtime:runtime-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

Breaking Change

  • Restructuring of the internal compiler API allows batching changes to the nodes generated as a result of composition into the "apply changes" phase of composition, after all @Composable functions have completed.

    This is a behavioral breaking change that might affect application code as nodes are no longer available from internal and experimental APIs until after changes have been applied. This can usually be worked around by surrounding code with such dependencies in a SideEffect composable to defer execution of the code until after the nodes have been created and initialized. ( I018da )

تغییرات API

  • Added a way to track if the recomposer has applied changes. ( I1b3e2 )
  • Expand [Abstract]ComposeView APIs to allow recycling Compose-based views, disposing their composition to recreate again later. Add APIs for installing and discovering window-scoped Recomposers and CompositionReferences for creating child compositions.

    Add ViewCompositionStrategy for configuring the composition disposal strategy of [Abstract]ComposeViews; default behavior is dispose on window detach. ( I860ab )

رفع اشکالات

  • Recomposer now exposes a Flow of its current state, allowing monitoring its activity and the activity of associated effects. ( Ifb2b9 )
  • The native keyEvent can now be accessed through keyEvent.nativeKeyEvent ( I87c57 , b/173086397 )

نسخه ۱.۰.۰-آلفا۰۹

۱۶ دسامبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

تغییرات API

  • Removed SlotTable, SlotReader and SlotWriter from the public API. These were marked as InternalComposeAPI previously. Now they are internal to the compose module.

    CompositionData and CompositionGroup were added as a replacement for the ui-tooling API to use to extract composition information. These are public but are not intended for use outside the ui-tooling API as they provide the raw information the ui-tooling API interprets ( I31a9c )

  • The Applier class is no longer considered an ( Id85b0 )

  • The Applier interface has changed to simplify building trees bottom-up instead of top-down.

    The insert() method has been renamed to insertTopDown() .

    A new method, insertBottomUp() , was added.

    An applier either inserts nodes into the tree it is editing using insertTopDown() or insertBottomUp() depending on which performs better.

    Some trees, such as LayoutNode and View , are much more efficient to build bottom-up than top-down. Prior to this change, a stack of inserts was required to implement bottom-up which needed to be copied to every applier which needed bottom-up construction for performance. With this change an Applier overrides insertBottomUp() to build a tree bottom-up and insertTopDown() to build the tree top-down. ( Icbdc2 )

  • Compose supports property getters that can make composable invocations. Support for this is not going away, but the syntax for declaring a property getter as being @Composable is changing.

    The now-deprecated syntax for doing this was by annotating the property itself:

        @Composable val someProperty: Int get() = ...
    

    The now-correct syntax for doing this is by annotating the getter of the property:

       val someProperty: Int @Composable get() = ...
    

    Both syntaxes will work for some time, but the former deprecated syntax will eventually become a compile error. ( Id9197 )

رفع اشکالات

نسخه ۱.۰.۰-آلفا۰۸

۲ دسامبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

تغییرات API

  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • Recomposer no longer accepts an EmbeddingContext; required scheduling dependencies are obtained from the effectCoroutineContext. FrameManager is deprecated; platform integrations should initialize their own global snapshot handling. ( I02369 )
  • RestorableStateHolder.withRestorableState function was renamed to RestorableStateProvider ( I66640 )

رفع اشکالات

  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Remove old ui-test module and its stubs ( I3a7cb )

نسخه ۱.۰.۰-آلفا۰۷

۱۱ نوامبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

ویژگی‌های جدید

تغییرات API

  • The @UnionType annotation has been deprecated ( I57cde )
  • provideDefault was added as an alternative to provide for providing ambients, and it can be used to specify ambient values that will only be set when there is no ambient value already provided. ( Id6635 , b/171024925 )
  • LaunchedTask was renamed to LaunchedEffect for consistency with the SideEffect and DisposableEffect APIs. LaunchedEffect with no subject params is not permitted in order to encourage best practices. ( Ifd3d4 )
  • Applier now has onBeginChanges/onEndChanges callbacks that are invoked when a Composer begins/is finished applying changes to the tree. These may be used for batching resource management if needed. ( Icf476 )
  • Recomposer now requires a CoroutineContext at construction ( Ic4610 )
  • Changes to the internal SlotTable implementation which should not affect the public API. ( If9828 )
  • Deprecated rxjava2 adapters which does not take the initial value were removed ( Idb72f )

رفع اشکالات

  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • BaseTextField has been deprecated. Use BasicTextField instead. ( I896eb )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

External Contribution

  • Added runtime-rxjava3 module for compose. Similar to runtime-rxjava2 ( I02cbf )

نسخه ۱.۰.۰-alpha06

۲۸ اکتبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

تغییرات API

  • Recomposer is now a CompositionReference and a valid composition parent. Explicit Recomposer is now required in fewer places. ( I4036f )
  • Added DisposableEffect counterpart API to SideEffect, filling the role of onCommit-with-params but with a required onDispose.
    • Added rememberUpdatedState API to publish data from recomposition to ongoing or long-lived processes such as DisposableEffects or LaunchedTasks.
    • ( Id50b9 )
  • MutableVector now implements RandomAccess ( I85d73 , b/170461551 )
  • Added SideEffect composable for applying side effects of composition to objects managed by the composition. SideEffect is intended to replace the onCommit composable. ( Ia77c2 )
  • New experimental api RestorableStateHolder. It allows to save the state defined with [savedInstanceState] and [rememberSavedInstanceState] for the subtree before disposing it to make it possible to compose it back next time with the restored state. ( I66884 , b/166586419 )

رفع اشکالات

  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )

نسخه ۱.۰.۰-آلفا۰۵

۱۴ اکتبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

تغییرات API

  • Experimental Modifier.pointerInput suspending input modifier ( Ia77d2 )
  • The scrolling performance of LazyColumn/Row is improved by doing less work in subcomposition on every scroll. The new hasInvalidations() method was added for Composition class. hasPendingChanges() method from Recomposer was renamed to hasInvalidations() ( Ib2f32 , b/168293643 , b/167972292 , b/165028371 )
  • Add produceState API for launching coroutines from composition that update a single State<T> value over time ( Id4a57 )
  • launchInComposition renamed to LaunchedTask to match Compose API guidelines ( I99a8e )
  • The order of place() calls in custom Layouts now defines the drawing order for the children ( Ibc9f6 )

نسخه ۱.۰.۰-آلفا۰۴

۱ اکتبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

تغییرات API

  • Added OwnerScope to allow collection of layout and drawing observation scopes once they are no longer valid. ( Ic4cf8 )
  • Added derivedStateOf API to create State objects based on a calculation which may read (and derive from) other State objects ( If758b )
  • Added TestOnly API for SnapshotStateObserver ( I6e2a9 )

رفع اشکالات

  • foundation.Box was deprecated. Please use foundation.layout.Box instead. ( Ie5950 , b/167680279 )

نسخه ۱.۰.۰-آلفا۰۳

۱۶ سپتامبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

تغییرات API

  • CompositionCoroutineScope no longer implements MonotonicFrameClock . Callers of withFrameNanos should import the top-level function explicitly. ( Icb642 , b/166778123 )

رفع اشکالات

  • Global testing functions such as onNode or waitForIdle are now deprecated, please migrate to their new counterparts that are defined on ComposeTestRule ( I7f45a )
  • launchInComposition no longer launches coroutines undispatched ( Ief6af , b/166486000 )

نسخه ۱.۰.۰-آلفا۰۲

۲ سپتامبر ۲۰۲۰

androidx.compose.runtime:runtime-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

تغییرات API

  • Add snapshotFlow and withMutableSnapshot APIs for consuming and producing Snapshot data changes. ( I3e722 )
  • The calling convention for composable functions has changed. This is a binary breaking change. All libraries must be recompiled to work with this version of the compose compiler plugin.

    This change does not create a source level breaking change as the only APIs that have changed are compiler APIs that have an explicit opt in. ( I7afd2 , b/158123185 )

  • Removed scheduling methods from EmbeddingContext ( I7b9be )

  • onPreCommit is deprecated; onCommit now has onPreCommit's behavior.

    onCommit and onActive now run in the same choreographer frame that the composition changes committed in rather than at the beginning of the next choreographer frame. ( I70403 )

نسخه ۱.۰.۰-آلفا۰۱

August 26, 2020

androidx.compose.runtime:runtime-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

Version 0.1.0-dev

Version 0.1.0-dev17

۱۹ آگوست ۲۰۲۰

androidx.compose.runtime:runtime-*:0.1.0-dev17 is released. Version 0.1.0-dev17 contains these commits.

تغییرات API

  • Custom emits can now declare that one or more of its setters can be skipped and recomposed independently of the emit. ( Ibbd13 )
  • Removed deprecated FrameManager calls.

    Internal compose APIs have been changed to reduce the amount of overhead to track state objects such as mutableStateof() ( I80ba6 )

  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )

  • Flow.collectAsState now determines the default dispatcher from the composition itself rather than defaulting to Dispatchers.Main. ( I9c1d9 )

  • Crash when something which saves the state was used inside the for loop is fixed. Now having the same key in savedInstanceState() is allowed, api of UiSavedStateRegistry is now adjusted to this new requirement ( I4ab76 , b/160042650 , b/156853976 , b/159026663 , b/154920561 )

رفع اشکالات

  • emitView was deprecated. Use AndroidView instead if possible for emitting Views inside Compose. Note that composing Views and ViewGroups directly will not be supported in the future unless these are leaves in the composition tree, case when this can be achieved using AndroidView. ( I29b1e , b/163871221 )

Version 0.1.0-dev16

۵ آگوست ۲۰۲۰

androidx.compose.runtime:runtime-*:0.1.0-dev16 is released. Version 0.1.0-dev16 contains these commits.

تغییرات API

  • The default mutation policy of mutableStateOf() , ambientOf() and savedInstanceStateOf() has changed to be structuralEqualityPolicy() instead of referentialEqualityPolicy() .

    The default for deciding if a new value assigned to a mutableStateOf() instance is considered a change now defaults to using == instead of using === .

    See https://kotlinlang.org/docs/reference/equality.html

    ambientOf() and savedInstanceStateOf() use mutableStateOf() in their implementations so they were changed to be consistent with mutableStateOf() .

    Using structural equality more closely matches developer expectations.

    برای مثال،

    val state = mutableStateOf(1f)
    

    followed by,

    state.value = 1f
    

    will no longer be consider a change to state and uses of state during composition will no longer need to be recomposed.

    This is a breaking change but, in most cases (such when using classes that do not override equals() ), this will not have a noticeable effect on an application.

    Classes that do override equals() , such as data classes, might see a performance degradation as their equals() methods are now, by default, called when assigned to a mutableStateOf() .

    The previous behavior can be restored by adding the policy parameter policy = referentialEqualityPolicy() to calls to mutableStateOf() , ambientOf() and savedInstanceStateOf() . ( Ic21a7 )

  • Row and Column are now inline function significantly reducing the overhead of using them. ( I75c10 )

رفع اشکالات

  • setViewContent was deprecated. setContent should be used instead. ( I7e497 , b/160335130 )
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

    The MonotonicFrameClock equivalent of ManualAnimationClock is now ManualFrameClock. ( I111c7 , b/161247083 )

  • Modifier.stateDraggable was completely reworked and renamed to Modifier.swipeable. A new SwipeableState class was introduced, and DrawerState and BottomDrawerState were refactored to inherit from it. [Modal/Bottom]DrawerLayout no longer take an onStateChange parameter. ( I72332 , b/148023068 )

  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )

  • SubcomposeLayout is added. It is a low level primitive which allows to compose the children during the measuring if we want to use some values available only later during the measure for the subtree composition. For example WithConstraints is not implemented using SubcomposeLayout. ( I25cc8 )

  • Material FilledTextField was renamed to TextField and foundational TextField was renamed to BaseTextField to make simplest desired API easy to discover and use ( Ia6242 , b/155482676 )

  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

۲۲ ژوئیه ۲۰۲۰

androidx.compose.runtime:runtime-*:0.1.0-dev15 is released. Version 0.1.0-dev15 contains these commits.

Dependencies Update

  • To use the 0.1.0-dev15 version of Compose, you will need to update your dependencies according to the new code snippets shown above in Declaring dependencies .

تغییرات API

  • @Model annotation is now deprecated. Use state and mutableStateOf as alternatives. This deprecation decision was reached after much careful discussion.

    Justification

    Rationale includes but is not limited to:

    • Reduces API surface area and concepts we need to teach
    • More closely aligns with other comparable toolkits (Swift UI, React, Flutter)
    • Reversible decision. We can always bring @Model back later.
    • Removes corner-case usage and difficult to answer questions about configuring @Model as things we need to handle
    • @Model data classes, equals, hashcode, etc.
    • How do I have some properties “observed” and others not?
    • How do I specify structural vs. referential equality to be used in observation?
    • Reduces “magic” in the system. Would reduce the likelihood of someone assuming system was smarter than it is (ie, it knowing how to diff a list)
    • Makes the granularity of observation more intuitive.
    • Improves refactorability from variable -> property on class
    • Potentially opens up possibilities to do hand-crafted State-specific optimizations
    • More closely aligns with the rest of the ecosystem and reduces ambiguity towards immutable or us “embracing mutable state”

    Migration Notes

    Almost all existing usages of @Model are fairly trivially transformed in one of two ways. The example below has a @Model class with two properties just for the sake of example, and has it being used in a composable.

    @Model class Position(
     var x: Int,
     var y: Int
    )
    
    @Composable fun Example() {
     var p = remember { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p.x = it }
       onYChange={ p.y = it }
     )
    }
    

    Alternative 1: Use State<OriginalClass> and create copies.

    This approach is made easier with Kotlin's data classes. Essentially, make all previously var properties into val properties of a data class, and then use state instead of remember , and assign the state value to cloned copies of the original using the data class copy(...) convenience method.

    It's important to note that this approach only works when the only mutations to that class were done in the same scope that the State instance is created. If the class is internally mutating itself outside of the scope of usage, and you are relying on the observation of that, then the next approach is the one you will want to use.

    data class Position(
     val x: Int,
     val y: Int
    )
    
    @Composable fun Example() {
     var p by state { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p = p.copy(x=it) }
       onYChange={ p = p.copy(y=it) }
     )
    }
    

    Alternative 2: Use mutableStateOf and property delegates

    This approach is made easier with Kotlin's property delegates and the mutableStateOf API which allows you to create MutableState instances outside of composition. Essentially, replace all var properties of the original class with var properties with mutableStateOf as their property delegate. This has the advantage that the usage of the class will not change at all, only the internal implementation of it. The behavior is not completely identical to the original example though, as each property is now observed/subscribed to individually, so the recompositions you see after this refactor could be more narrow (a good thing).

    class Position(x: Int, y: Int) {
     var x by mutableStateOf(x)
     var y by mutableStateOf(y)
    }
    
    // source of Example is identical to original
    @Composable fun Example() {
     var p = remember { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p.x = it }
       onYChange={ p.y = it }
     )
    }
    

    ( I409e8 , b/152050010 , b/146362815 , b/146342522 , b/143413369 , b/135715219 , b/143263925 , b/139653744 )

  • Changes the code generation strategy of Compose's compiler. Prior to the change, the compose compiler would transform calls to composable functions. With this change, we now transform the body of a composable function and leave the callsite unaltered (mostly).

    This means that most of the logic communicating with the compose runtime happens at the start of the function body, instead of at the callsite.

    This should be a source-compatible change for all usage of compose. Most users of compose should not have to update any code as a result of this change.

    In order to support this work, the JVM signature of all composable functions has changed. A Composable function accepting a single parameter is transformed into a function accepting 3 parameters, the additional parameters are the Composer, a 'key' integer. a bitmask integer used to propagate metadata through calls.

    Compose now also transforms default arguments to a composable function. It does this without introducing an additional synthetic default overload of the function itself, so this change will result in fewer functions being defined.

    Known intentional behavioral changes resulting from this:

    1. Some calls will skip where they wouldn't have previously
    2. Composable expressions in default argument expressions are now correctly subscribed to and handled

    This work included some optimizations: 1. The result of comparisons of parameters are propagated through the call graph to other composable functions. This will result in fewer comparisons at runtime, reduces the slot table size, as well as more skipping of composable functions that were previously not skipped 2. Paremeters which are determined to be “static” at compile time are no longer compared or stored in the runtime. This reduces the number of comparisons and reduces slot table size. 3. Control flow structure of the body of functions is used to minimize the number of groups that are generated. This reduces slot table size and results in less work for the runtime 4. Unused dispatch and receiver parameters to functions are not included in determining skippability of the function if they are not used inside of the body of the function.

    Most breaking changes were for APIs that the compiler targets directly, and typical use of compose will not be affected: 1. Composer::startExpr was removed 2. Composer::endExpr was removed 3. Composer::call was deprecated 4. The non-varargs overloads of key have been removed. Use the vararg version going forward. 5. The Pivotal annotation was deprecated. Use key as a replacement. 6. ScopeUpdateScope::updateScope was changed to expect a Function3 instead of Function1 7. restartableFunction and restartableFunctionN were updated to include additional compile time parameters ( I60756 , b/143464846 )

  • Added sortWith and removeRange to MutableVector ( Icccf7 )

  • Added default method implementations for CompositionLifecycleObserver ( I24289 )

  • Applier now requires a clear() method for disposing compositions ( Ibe697 )

  • Added asMutableList() to MutableVector to allow it to be passed to public API without having to copy the entire list. ( I298df )

  • Added rememberCoroutineScope() to obtain a managed CoroutineScope in composition for launching jobs in response to events. ( I0e264 )

  • MutableVector is a new collection that does not implement any of the standard Collection interface. This collection offers speed above other requirements and is intended to only be used in internal implementations. ( I8ebd6 )

  • Temporarily removed StableMutableList and StableMutableMap to avoid an issue in the version of Kotlin compose requires. These interfaces will be reintroduced once compose is updated to a version of Kotlin that doesn't have the issue.

    SnapshotStateList and SnapshotStateMap are now public but they will be deprecated once StableMutableList and StableMutableMap are restored. ( Ia7769 )

  • add top-level withFrameNanos function for animation timing ( Ie34c5 )

  • @Untracked annotation has been deprecated. Replace with @ComposableContract(tracked=false) ( Id211e )

  • RestartableFunction and associated APIs have been renamed to ComposableLambda, etc. These APIs were targeted only by the compiler so this should not affect source level compatibility normally. The rename was done primarily to communicate what this class is better when it shows up in stack traces ( I7eb25 )

  • @Composable annotation is no longer valid on classes ( Ia5f02 )

  • Ambient<T> is now @Stable instead of @Immutable ( I0b4bb )

  • Prior to this change, the compose compiler plugin would non-trivially intercept calls to constructors inside of a @Composable function if there was an ( I5205a , b/158123804 )

  • The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. ( Ifc992 )

  • Observe is no longer a useful abstraction. If you need to replicate it, its implementation can be replicated by just creating a composable function which executes a composable lambda parameter. For example, @Composable fun Observe(body: @Composable () -> Unit) = body() ( I40d37 )

  • @Direct was deprecated in favor of @ComposableContract(restartable=false) ( If4708 )

  • Added an adapter for the recently introduced StateFlow which allows as to pre-populate the initial value so the returned State is non-nullable ( I61dd8 , b/156233789 )

  • Added an adapter for Flow. Example of the usage: val value by flow.collectAsState() ( If2198 , b/153375923 )

  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )

  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )

  • Updated the ComposeFlags.COMPOSER_PARAM flag to be true , which will change the code generation strategy for the compose plugin. At a high level, this causes @Composable functions to be generated with an additional synthetic parameter, which is passed through to subsequent @Composable calls in order for the runtime to properly manage execution. This is a significant binary breaking change, however, should preserve source-level compatibility in all sanctioned usage of compose. ( I7971c )

  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )

  • Added ui-livedata - new artifact with an adapter for LiveData. Example of the usage: val value by liveData.observeAsState() ( Ie9e8c , b/150465596 )

  • Rx adapters without explicit initial value are deprecated. Using null is not always the best default, for example when you have a List it is better to start with emptyList() or any other reasonable default ( I00025 , b/161348384 )

  • Added ui-rxjava2 - new artifact with adapters for RxJava2. Example of the usage: val value by observable.subscribeAsState() ( Ifab4b , b/153369097 )

  • savedInstanceState() can now be used with nullable types ( I6847f , b/153532190 )

  • New listSaver() and mapSaver() to make it easier to write custom Saver objects ( I8cf68 , b/152331508 )

  • New functions: savedInstanceState() and rememberSavedInstanceState(). They are similar to state() and remember() but have a saved instance state support build in ( If1987 , b/152025209 )

رفع اشکالات

  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Made LayoutNode experimental API ( I4f2e9 )
  • androidx.ui.foundation.TextFieldValue and androidx.ui.input.EditorValue is deprecated. TextField, FilledTextField and CoreTextField composables that uses that type is also deprecated. Please use androidx.ui.input.TextFieldValue instead ( I4066d , b/155211005 )
  • Removed deprecated DrawBackground API in favor of drawBackground extension APIs on Modifier. Refactored color, brush and paint drawBackground implementations to reduce code paths as well as remove requirement for Modifier to be created as part of composition. ( I0343a )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • WithConstraints trailing lambda API has been changed. Now instead of two params it has a receiver scope which in addition to constraints and layoutDirection provides minWidth, maxWidth, minHeight and maxHeight properties in Dp ( I91b9a , b/149979702 )
  • Added symmetric padding modifier. ( I39840 )
  • Updated wrapContentWidth and wrapContentHeight to expect vertical or horizontal Alignment rather than any Alignment. The gravity modifier was updated to accept vertical or horizontal Alignment. Row, Column and Stack were updated to support custom continuous Alignments. ( Ib0728 )
  • ui-text module is renamed as ui-text-core ( I57dec )
  • Improve DrawModifier API:
    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )
  • Replaced Modifier plus operator with factory extension functions ( I225e4 )
  • RowScope and ColumnScope members are now accessible outside Row and Column. ( I3a641 )
  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )
  • WithConstraints got LayoutDirection parameter ( I6d6f7 )
  • Renamed background to DrawBackground and make it to be memorized by default ( Ia0bd3 )
  • Replaced ButtonStyle with distinct functions and removed text (string) overload. See updated samples for usage information. ( If63ab , b/146478620 , b/146482131 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )

External Contribution

  • Remove unneeded API such as Looper and Handler from Compose Runtime porting layer ( I6847d )
  • Deprecate Flow<T>.collectAsState() with no initial value. Use StateFlow<T> or pass an explicit initial value instead. ( I63f98 , b/157674865 )