Skip to content

Commit bfe95dd

Browse files
authored
fix: add stability configuration file to the core maps-compose project. The currently configured types are all the immutable data types from com.google.android.gms.maps.model that are currently used in android-maps-compose:maps-compose. These types will now be considered @stable by the compiler. Making immutable data types @stable can be a more effective measure than relying on strong skipping, as stable types can use structural equality, whereas strong skipping merely relies on referential equality, as of today. (#517)
This commit also makes compose compiler report generation available via command-line options (-PcomposeCompilerMetrics=true, -PcomposeCompilerReports=true) Fixes #152
1 parent 0599412 commit bfe95dd

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

maps-compose/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ android {
3131
jvmTarget = '1.8'
3232
freeCompilerArgs += '-Xexplicit-api=strict'
3333
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
34+
35+
freeCompilerArgs += [
36+
"-P",
37+
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=" +
38+
layout.projectDirectory.file('compose_compiler.conf').asFile.absolutePath
39+
]
40+
41+
if (findProperty("composeCompilerReports") == "true") {
42+
freeCompilerArgs += [
43+
"-P",
44+
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
45+
project.buildDir.absolutePath + "/compose_compiler"
46+
]
47+
}
48+
if (findProperty("composeCompilerMetrics") == "true") {
49+
freeCompilerArgs += [
50+
"-P",
51+
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
52+
project.buildDir.absolutePath + "/compose_compiler"
53+
]
54+
}
3455
}
3556
}
3657

maps-compose/compose_compiler.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
com.google.android.gms.maps.model.BitmapDescriptor
2+
com.google.android.gms.maps.model.Cap
3+
com.google.android.gms.maps.model.LatLng
4+
com.google.android.gms.maps.model.LatLngBounds
5+
com.google.android.gms.maps.model.MapStyleOptions
6+
com.google.android.gms.maps.model.PatternItem
7+
com.google.android.gms.maps.model.PinConfig

0 commit comments

Comments
 (0)