mirror of
				https://github.com/JakeWharton/mosaic.git
				synced 2025-10-31 18:58:37 +08:00 
			
		
		
		
	Update to Compose alpha11
This commit is contained in:
		| @ -1,7 +1,7 @@ | |||||||
| buildscript { | buildscript { | ||||||
| 	ext.versions = [ | 	ext.versions = [ | ||||||
| 		'compose': '1.0.0-alpha10', | 		'compose': '1.0.0-alpha11', | ||||||
| 		'kotlin': '1.4.21', | 		'kotlin': '1.4.21-2', | ||||||
| 		'kotlinxCoroutines': '1.4.1', | 		'kotlinxCoroutines': '1.4.1', | ||||||
| 	] | 	] | ||||||
| 	ext.deps = [ | 	ext.deps = [ | ||||||
|  | |||||||
 Submodule compose/upstream updated: 6207afb164...6950aab50f
									
								
							| @ -1,7 +1,7 @@ | |||||||
| package example | package example | ||||||
|  |  | ||||||
| import androidx.compose.runtime.Composable | import androidx.compose.runtime.Composable | ||||||
| import androidx.compose.runtime.LaunchedTask | import androidx.compose.runtime.LaunchedEffect | ||||||
| import androidx.compose.runtime.getValue | import androidx.compose.runtime.getValue | ||||||
| import androidx.compose.runtime.mutableStateListOf | import androidx.compose.runtime.mutableStateListOf | ||||||
| import androidx.compose.runtime.mutableStateOf | import androidx.compose.runtime.mutableStateOf | ||||||
| @ -125,7 +125,7 @@ private fun Summary(tests: SnapshotStateList<Test>) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	var elapsed by remember { mutableStateOf(0) } | 	var elapsed by remember { mutableStateOf(0) } | ||||||
| 	LaunchedTask { | 	LaunchedEffect(Unit) { | ||||||
| 		while (true) { | 		while (true) { | ||||||
| 			delay(1_000) | 			delay(1_000) | ||||||
| 			elapsed++ | 			elapsed++ | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| buildscript { | buildscript { | ||||||
| 	dependencies { | 	dependencies { | ||||||
| 		classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21' | 		classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21-2' | ||||||
| 		classpath "com.jakewharton.mosaic:gradle:${mosaicVersion}" | 		classpath "com.jakewharton.mosaic:gradle:${mosaicVersion}" | ||||||
| 	} | 	} | ||||||
| 	repositories { | 	repositories { | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| package com.jakewharton.mosaic | package com.jakewharton.mosaic | ||||||
|  |  | ||||||
| import androidx.compose.runtime.Composable | import androidx.compose.runtime.Composable | ||||||
|  | import androidx.compose.runtime.ComposeNode | ||||||
| import androidx.compose.runtime.Immutable | import androidx.compose.runtime.Immutable | ||||||
| import androidx.compose.runtime.Stable | import androidx.compose.runtime.Stable | ||||||
| import androidx.compose.runtime.emit |  | ||||||
| import com.facebook.yoga.YogaFlexDirection | import com.facebook.yoga.YogaFlexDirection | ||||||
|  |  | ||||||
| @Composable | @Composable | ||||||
| @ -13,7 +13,7 @@ fun Text( | |||||||
| 	background: Color? = null, | 	background: Color? = null, | ||||||
| 	style: TextStyle? = null, | 	style: TextStyle? = null, | ||||||
| ) { | ) { | ||||||
| 	emit<TextNode, MosaicNodeApplier>(::TextNode) { | 	ComposeNode<TextNode, MosaicNodeApplier>(::TextNode) { | ||||||
| 		set(value) { | 		set(value) { | ||||||
| 			this.value = value | 			this.value = value | ||||||
| 		} | 		} | ||||||
| @ -107,7 +107,7 @@ fun Column(children: @Composable () -> Unit) { | |||||||
|  |  | ||||||
| @Composable | @Composable | ||||||
| private fun Box(flexDirection: YogaFlexDirection, children: @Composable () -> Unit) { | private fun Box(flexDirection: YogaFlexDirection, children: @Composable () -> Unit) { | ||||||
| 	emit<BoxNode, MosaicNodeApplier>( | 	ComposeNode<BoxNode, MosaicNodeApplier>( | ||||||
| 		factory = ::BoxNode, | 		factory = ::BoxNode, | ||||||
| 		update = { | 		update = { | ||||||
| 			set(flexDirection) { | 			set(flexDirection) { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jake Wharton
					Jake Wharton