Skip to content

Commit

Permalink
support kotlin 2.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
0xera committed Nov 3, 2024
1 parent 596204e commit ac2c29b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ class SkippabilityComponentRegistrar : ComponentRegistrar {
}

project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(SkippabilityChecker(isStrongSkippingModeEnabled, isStrongSkippingFailFastEnabled, messageCollector, stableTypeMatchers), LoadingOrder.LAST)
.registerExtension(
SkippabilityChecker(
isStrongSkippingModeEnabled,
isStrongSkippingFailFastEnabled,
messageCollector,
stableTypeMatchers
), LoadingOrder.LAST, project
)

// FirExtensionRegistrarAdapter.registerExtension(project, SkippabilityCheckerFirExtensionRegistrar())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SourceInformationComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(SourceInformationCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(SourceInformationIrGeneration(), LoadingOrder.LAST)
.registerExtension(SourceInformationIrGeneration(), LoadingOrder.LAST, project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ internal class TestTagApplier(
"$FILENAME_PLACEHOLDER-$PARENT_FUNCTION_NAME_PLACEHOLDER($PARENT_FUNCTION_OFFSET_PLACEHOLDER)-$CALLING_FUNCTION_NAME_PLACEHOLDER($CALLING_FUNCTION_OFFSET_PLACEHOLDER)"

private const val MODIFIER = "androidx.compose.ui.Modifier"
private val OUTER_FUNCTION_NAME_PLACEHOLDER_REGEX = "%outer_function_name\\[range=(?<range>.+)]\\[delimiter=(?<delimiter>.+)]\\[prefix=(?<prefix>.+)]\\[suffix=(?<suffix>.+)]%".toRegex()
private const val MODIFIER_COMPANION = "${MODIFIER}.Companion"
private val Composable = FqName( "androidx.compose.runtime.Composable")
private val modifierObjectClassId = ClassId(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TestTagApplierComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(TestTagApplierCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(TestTagApplierIrGeneration(configuration.get(TestTagApplierCommandLineProcessor.TAG_TEMPLATE, DEFAULT_TAG_TEMPLATE)), LoadingOrder.FIRST)
.registerExtension(TestTagApplierIrGeneration(configuration.get(TestTagApplierCommandLineProcessor.TAG_TEMPLATE, DEFAULT_TAG_TEMPLATE)), LoadingOrder.FIRST, project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestTagCleanerComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(TestTagCleanerCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(TestTagCleanerIrGeneration(), LoadingOrder.FIRST)
.registerExtension(TestTagCleanerIrGeneration(), LoadingOrder.FIRST, project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestTagDrawerComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(TestTagDrawerCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(TestTagDrawerIrGeneration(), LoadingOrder.FIRST)
.registerExtension(TestTagDrawerIrGeneration(), LoadingOrder.FIRST, project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RecomposeHighlighterComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(RecomposeHighlighterCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(RecomposeHighlighterIrGeneration(), LoadingOrder.FIRST)
.registerExtension(RecomposeHighlighterIrGeneration(), LoadingOrder.FIRST, project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RecomposeLoggerComponentRegistrar : ComponentRegistrar {
val logModifierChanges = configuration.get(RecomposeLoggerCommandLineProcessor.LOG_MODIFIER_CHANGES, true)
val logFunctionChanges = configuration.get(RecomposeLoggerCommandLineProcessor.LOG_FUNCTION_CHANGES, true)
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(RecomposeLoggerIrGeneration(logModifierChanges, logFunctionChanges), LoadingOrder.FIRST)
.registerExtension(RecomposeLoggerIrGeneration(logModifierChanges, logFunctionChanges), LoadingOrder.FIRST, project)
}
}

Expand Down

0 comments on commit ac2c29b

Please sign in to comment.