Skip to content

Commit 1208eec

Browse files
zamullaSpace Team
authored and
Space Team
committed
fix: clarifications and language polishing
1 parent c87c5ab commit 1208eec

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

libraries/tools/kotlin-compose-compiler/src/common/kotlin/org/jetbrains/kotlin/compose/compiler/gradle/ComposeCompilerGradlePluginExtension.kt

+15-15
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import javax.inject.Inject
2929
/**
3030
* Provides DSL to configure Compose compiler plugin options.
3131
*
32-
* It is available in the build scripts under "composeCompiler" name:
32+
* It is available in the build scripts as the `composeCompiler {}` block:
3333
* ```
3434
* composeCompiler {
3535
* ...
@@ -38,7 +38,7 @@ import javax.inject.Inject
3838
*/
3939
abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor(objectFactory: ObjectFactory) {
4040
/**
41-
* Generate function key meta classes with annotations indicating the functions and their group keys.
41+
* Generate function key metaclasses with annotations indicating the functions and their group keys.
4242
*
4343
* Generally used for tooling.
4444
*/
@@ -48,15 +48,15 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
4848
* Include source information in generated code.
4949
*
5050
* Records source information that can be used for tooling to determine the source location of the corresponding composable function.
51-
* By default, this function is declared as having no side-effects. It is safe for code shrinking tools (such as R8 or ProGuard) to
51+
* By default, this function is declared as having no side effects. It is safe for code shrinking tools (such as R8 or ProGuard) to
5252
* remove it. This option does NOT impact the presence of symbols or line information normally added by the Kotlin compiler; this option
53-
* controls additional source information added by the Compose Compiler.
53+
* controls only additional source information added by the Compose Compiler.
5454
*/
5555
val includeSourceInformation: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(false)
5656

5757
/**
58-
* Save compose build metrics to this folder.
59-
* When specified, the Compose Compiler will dump metrics about the current module which can be useful when manually optimizing your
58+
* Save Compose build metrics to this folder.
59+
* When specified, the Compose compiler will dump metrics about the current module, which can be useful when manually optimizing your
6060
* application's runtime performance. The module.json will include the statistics about processed composables and classes, including
6161
* number of stable classes/parameters, skippable functions, etc.
6262
*
@@ -67,10 +67,10 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
6767
abstract val metricsDestination: DirectoryProperty
6868

6969
/**
70-
* Save compose build reports to this folder.
70+
* Save Compose build reports to this folder.
7171
*
72-
* When specified, the Compose Compiler will dump reports about the compilation which can be useful when manually optimizing
73-
* your application's runtime performance. These reports include information about which of your composable functions are skippable,
72+
* When specified, the Compose compiler will dump reports about the compilation, which can be useful when manually optimizing
73+
* your application's runtime performance. These reports include information on which of your composable functions are skippable,
7474
* which are restartable, which are readonly, etc.
7575
*
7676
* For more information, see these links:
@@ -134,7 +134,7 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
134134
abstract val stabilityConfigurationFile: RegularFileProperty
135135

136136
/**
137-
* List of paths to the stability configuration file.
137+
* List of paths to stability configuration files.
138138
*
139139
* For more information, see this link:
140140
* - [AndroidX stability configuration file](https://developer.android.com/develop/ui/compose/performance/stability/fix#configuration-file)
@@ -154,7 +154,7 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
154154
/**
155155
* Include composition trace markers in the generated code.
156156
*
157-
* When `true`, this flag tells the compose compiler to inject additional tracing information into the bytecode, which allows showing
157+
* When `true`, this flag tells the Compose compiler to inject additional tracing information into the bytecode, which allows showing
158158
* composable functions in the Android Studio system trace profiler.
159159
*
160160
* For more information, see this link:
@@ -163,7 +163,7 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
163163
val includeTraceMarkers: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(true)
164164

165165
/**
166-
* A set of Kotlin platforms to which the Compose plugin will be applied.
166+
* A set of Kotlin platforms to which the Compose compiler plugin will be applied.
167167
*
168168
* By default, all Kotlin platforms are enabled.
169169
*
@@ -192,9 +192,9 @@ abstract class ComposeCompilerGradlePluginExtension @Inject internal constructor
192192
.convention(KotlinPlatformType.values().asIterable())
193193

194194
/**
195-
* A set of feature flags to enable. A feature requires a feature flags when it is in the process of becoming the default
196-
* behavior of the Compose compiler. Features in this set will eventually be removed and disabling will no longer be
197-
* supported. See [ComposeFeatureFlag] for the list of features currently recognized by the plugin.
195+
* A set of feature flags to enable. A feature requires a feature flag when it is in the process of becoming the default
196+
* behavior of the Compose compiler. Features in this set will eventually be removed and integrated as baseline behavior;
197+
* after that, disabling them will no longer be supported. See [ComposeFeatureFlag] for the list of features currently recognized by the plugin.
198198
*
199199
* @see ComposeFeatureFlag
200200
*/

libraries/tools/kotlin-compose-compiler/src/common/kotlin/org/jetbrains/kotlin/compose/compiler/gradle/ComposeFeatureFlags.kt

+8-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sealed interface ComposeFeatureFlag : Named, Serializable {
7777
* Enable strong skipping.
7878
*
7979
* Strong Skipping is a mode that improves the runtime performance of your application by skipping unnecessary
80-
* invocations of composable functions for which the parameters have not changed. In particular, when enabled, Composable functions
80+
* invocations of composable functions for which the parameters have not changed. In particular, when enabled, composable functions
8181
* with unstable parameters become skippable and lambdas with unstable captures will be memoized.
8282
*
8383
* For more information, see this link:
@@ -116,10 +116,11 @@ sealed interface ComposeFeatureFlag : Named, Serializable {
116116
* Removing groups around non-skipping composable function is an experimental mode which improves the runtime performance of your
117117
* application by skipping unnecessary groups around composable functions which do not skip (and thus do not require a group). This
118118
* optimization will remove the groups around functions that are not skippable such as explicitly marked as
119-
* `@NonSkippableComposable` and functions that are implicitly not skippable such inline functions and functions that return a
120-
* non-Unit value such as remember.
119+
* `@NonSkippableComposable` and functions that are implicitly not skippable, such as inline functions and functions that return a
120+
* non-`Unit` value such as `remember`.
121121
*
122-
* This feature is still considered experimental and is thus disabled by default. To enable,
122+
* This feature is still considered experimental and is thus disabled by default. To enable, add this line
123+
* to the `composeCompiler {}` block:
123124
* ```
124125
* composeCompiler {
125126
* featureFlags = setOf(ComposeFeatureFlag.OptimizeNonSkippingGroups)
@@ -130,13 +131,14 @@ sealed interface ComposeFeatureFlag : Named, Serializable {
130131
val OptimizeNonSkippingGroups: ComposeFeatureFlag = Enabled(Feature.OptimizeNonSkippingGroups)
131132

132133
/**
133-
* Change the code generation of composable function to enable pausing when part of pausable composition.
134+
* Change the code generation of composable functions to enable pausing when a composable function is part of a pausable composition.
134135
*
135136
* Pausable composition is an experimental runtime feature. Experiments with this feature can be run by enabling this feature flag
136137
* and using a runtime version that supports pausable composition. If the runtime used does not support pausable composition, no
137138
* change is made to the code generation.
138139
*
139-
* This feature is still considered experimental and is thus disabled by default. It can be enabled by adding,
140+
* This feature is still considered experimental and is thus disabled by default. To enable, add this line
141+
* to the `composeCompiler {}` block:
140142
*```
141143
* composeCompiler {
142144
* featureFlag = setOf(ComposeFeatureFlag.PausableComposition)

0 commit comments

Comments
 (0)