Skip to content

Commit

Permalink
Enable Compose strong skipping mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Dec 3, 2023
1 parent 3a25578 commit 0afb5ad
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package io.github.reactivecircus.kstreamlined.android.designsystem.foundation.color

import androidx.compose.runtime.Immutable
import androidx.compose.runtime.ProvidableCompositionLocal
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Color

@Immutable
public class KSColorScheme internal constructor(
public val primary: Color,
public val primaryDark: Color,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.reactivecircus.kstreamlined.android.designsystem.foundation.typography

import androidx.compose.runtime.Immutable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
Expand All @@ -9,7 +8,6 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import io.github.reactivecircus.kstreamlined.android.designsystem.R

@Immutable
public class KSTypography internal constructor(
public val headlineLarge: TextStyle,
public val headlineMedium: TextStyle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package io.github.reactivecircus.kstreamlined.buildlogic

import org.gradle.api.file.DirectoryProperty

internal val additionalCompilerArgs = listOf(
"-XXLanguage:+InlineClasses",
internal val commonCompilerArgs = listOf(
"-Xjvm-default=all",
)

Expand All @@ -20,3 +19,8 @@ internal fun composeCompilerReportsArgs(buildDir: DirectoryProperty) = buildDir.
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$it"
)
}

internal val composeCompilerStrongSkippingArgs = listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true"
)
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ internal fun TestedExtension.configureCommonAndroidOptions(project: Project) {
freeCompilerArgs += buildList {
addAll(composeCompilerMetricsArgs(project.layout.buildDirectory).get())
addAll(composeCompilerReportsArgs(project.layout.buildDirectory).get())
addAll(composeCompilerStrongSkippingArgs)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal fun KotlinMultiplatformExtension.configureKMPTest() {
internal fun Project.configureKotlinCommonCompileOptions() {
tasks.withType<KotlinCommonCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + additionalCompilerArgs
freeCompilerArgs = freeCompilerArgs + commonCompilerArgs
}
}
}
Expand Down

0 comments on commit 0afb5ad

Please sign in to comment.