Skip to content

Commit dd6eec7

Browse files
authored
Collects all subproject packages for cross-module detection (#88)
* Fetch dependency structures from the rootprojects * Prepare for release 0.6.3
1 parent 822107f commit dd6eec7

File tree

5 files changed

+52
-15
lines changed

5 files changed

+52
-15
lines changed

CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.6.2] - 2025-12-13
8+
## [0.6.3] - 2025-12-13
99

1010
### Added
1111
- **Cross-module stability detection** - Classes from other Gradle modules now require explicit stability annotations
1212
- Compiler plugin: Detects cross-module types via IR origins and package matching
13-
- Gradle plugin: Automatically collects project dependencies and passes them to compiler
13+
- Gradle plugin: Automatically collects all subproject packages for cross-module detection
1414
- IDE plugin: Uses IntelliJ module system to identify cross-module boundaries
1515
- Classes from different modules marked as UNSTABLE unless annotated with @Stable/@Immutable/@StabilityInferred
1616
- Prevents accidentally assuming stability for types where implementation details aren't visible
1717
- Provides consistent behavior across compiler plugin, IDE plugin, and stability validation
1818

1919
### Fixed
20+
- **Fixed Gradle compatibility issues**
21+
- Removed deprecated `getDependencyProject()` usage for broader Gradle version compatibility
22+
- Implemented portable dependency collection that works across all Gradle versions
2023
- **Fixed compiler tests compatibility**
2124
- Updated StabilityTestConfigurator to pass new projectDependencies parameter
2225
- All compiler tests now passing with cross-module detection enabled
@@ -32,6 +35,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3235
- Better visibility of composable signatures while respecting ignore patterns
3336
- **Compacted code comments** for better readability across all cross-module detection implementations
3437

38+
## [0.6.2] - 2025-12-10
39+
40+
### Fixed
41+
- **Fixed property source file location and navigation in tool window** (Issue #67)
42+
- Tool window now correctly identifies source file for composable properties
43+
- Properties no longer show "Unknown.kt" as file name
44+
- Double-clicking on property names navigates to correct source location
45+
- Extended source location search to include `KtProperty` declarations
46+
47+
### Improved
48+
- **Enhanced tool window handling of ignored type patterns** (Issue #74)
49+
- Ignored parameters now displayed as stable instead of being hidden completely
50+
- Composable skippability is recalculated based on processed parameters
51+
- Provides better visibility of composable signatures while respecting ignore patterns
52+
3553
## [0.6.1] - 2025-12-06
3654

3755
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ It’s **strongly recommended to use the exact same Kotlin version** as this lib
192192

193193
| Stability Analyzer | Kotlin |
194194
|--------------------|-------------|
195-
| 0.4.0~0.6.2 | 2.2.21 |
195+
| 0.4.0~0.6.3 | 2.2.21 |
196196

197197
### TraceRecomposition Annotation
198198

compose-stability-analyzer-idea/CHANGELOG.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22

33
All notable changes to the IntelliJ IDEA plugin will be documented in this file.
44

5-
## [0.6.2] - 2025-12-13
5+
## [0.6.3] - 2025-12-13
66

77
### Added
88
- **Cross-module stability detection** - Classes from other modules now require explicit stability annotations
99
- Classes from different Gradle modules are marked as UNSTABLE unless annotated with @Stable/@Immutable/@StabilityInferred
10-
- Gradle plugin automatically detects project dependencies and passes them to compiler plugin
10+
- Gradle plugin automatically collects all subproject packages for cross-module detection
1111
- IDE plugin uses IntelliJ module system to identify cross-module types
1212
- Prevents accidentally assuming stability for classes where implementation details aren't visible
1313
- Both compiler plugin and IDE plugin now consistently handle cross-module boundaries
1414

1515
### Fixed
16+
- **Fixed Gradle compatibility issues**
17+
- Removed deprecated `getDependencyProject()` usage for broader Gradle version compatibility
18+
- Implemented portable dependency collection that works across all Gradle versions
1619
- **Fixed property source file location and navigation in tool window** (Issue #67)
1720
- Tool window now correctly identifies source file for composable properties
1821
- Properties no longer show "Unknown.kt" as file name
@@ -22,6 +25,23 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
2225
- Updated test configurator to pass projectDependencies parameter
2326
- All compiler tests now passing with cross-module detection enabled
2427

28+
### Improved
29+
- **Enhanced tool window handling of ignored type patterns** (Issue #74)
30+
- Ignored parameters are now displayed as stable instead of being hidden completely
31+
- Composable skippability is recalculated based on processed parameters after applying ignore patterns
32+
- Composables with only ignored unstable parameters now correctly show as skippable
33+
- Provides better visibility of composable signatures while respecting ignore patterns
34+
- **Compacted code comments** for better readability across all cross-module detection implementations
35+
36+
## [0.6.2] - 2025-12-10
37+
38+
### Fixed
39+
- **Fixed property source file location and navigation in tool window** (Issue #67)
40+
- Tool window now correctly identifies source file for composable properties
41+
- Properties no longer show "Unknown.kt" as file name
42+
- Double-clicking on property names in tool window now navigates to correct source location
43+
- Extended source location search to include `KtProperty` declarations in addition to `KtNamedFunction`
44+
2545
### Improved
2646
- **Enhanced tool window handling of ignored type patterns** (Issue #74)
2747
- Ignored parameters are now displayed as stable instead of being hidden completely

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
5151

5252
# Maven publishing
5353
GROUP=com.github.skydoves
54-
VERSION_NAME=0.6.2
54+
VERSION_NAME=0.6.3
5555

5656
POM_URL=https://github.com/skydoves/compose-stability-analyzer/
5757
POM_SCM_URL=https://github.com/skydoves/compose-stability-analyzer/

stability-gradle/src/main/kotlin/com/skydoves/compose/stability/gradle/StabilityAnalyzerGradlePlugin.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class StabilityAnalyzerGradlePlugin : KotlinCompilerPluginSupportPlugin {
4545

4646
// This version should match the version in gradle.properties
4747
// Update this when bumping the library version
48-
private const val VERSION = "0.6.2"
48+
private const val VERSION = "0.6.3"
4949

5050
// Compiler option keys
5151
private const val OPTION_ENABLED = "enabled"
@@ -318,14 +318,13 @@ public class StabilityAnalyzerGradlePlugin : KotlinCompilerPluginSupportPlugin {
318318
return try {
319319
val dependencies = mutableSetOf<String>()
320320

321-
project.configurations.forEach { config ->
322-
config.dependencies.forEach { dependency ->
323-
if (dependency is org.gradle.api.artifacts.ProjectDependency) {
324-
val dependentProject = dependency.dependencyProject
325-
val packageName = extractPackageName(dependentProject)
326-
if (packageName.isNotEmpty()) {
327-
dependencies.add(packageName)
328-
}
321+
// Collect packages from all other subprojects
322+
// This is a conservative approach: mark all cross-module classes as requiring annotations
323+
project.rootProject.allprojects.forEach { subproject ->
324+
if (subproject != project && subproject.name != project.rootProject.name) {
325+
val packageName = extractPackageName(subproject)
326+
if (packageName.isNotEmpty()) {
327+
dependencies.add(packageName)
329328
}
330329
}
331330
}

0 commit comments

Comments
 (0)