Skip to content

Commit b78ca7d

Browse files
committed
Distinguish if a package comes from a foreign module
1 parent 49443ba commit b78ca7d

File tree

19 files changed

+373
-265
lines changed

19 files changed

+373
-265
lines changed

app-model/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app-model/api/app-model.api

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
public final class com/skydoves/myapplication/model/ThirdPartyModel {
2+
public fun <init> (Ljava/lang/String;I)V
3+
public final fun component1 ()Ljava/lang/String;
4+
public final fun component2 ()I
5+
public final fun copy (Ljava/lang/String;I)Lcom/skydoves/myapplication/model/ThirdPartyModel;
6+
public static synthetic fun copy$default (Lcom/skydoves/myapplication/model/ThirdPartyModel;Ljava/lang/String;IILjava/lang/Object;)Lcom/skydoves/myapplication/model/ThirdPartyModel;
7+
public fun equals (Ljava/lang/Object;)Z
8+
public final fun getCount ()I
9+
public final fun getName ()Ljava/lang/String;
10+
public fun hashCode ()I
11+
public fun toString ()Ljava/lang/String;
12+
}
13+

app-model/build.gradle.kts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Designed and developed by 2025 skydoves (Jaewoong Eum)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
plugins {
17+
alias(libs.plugins.kotlin.jvm)
18+
}
19+
20+
java {
21+
sourceCompatibility = JavaVersion.VERSION_11
22+
targetCompatibility = JavaVersion.VERSION_11
23+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Designed and developed by 2025 skydoves (Jaewoong Eum)
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
18+
19+
</manifest>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Designed and developed by 2025 skydoves (Jaewoong Eum)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.skydoves.myapplication.model
17+
18+
data class ThirdPartyModel(
19+
val name: String,
20+
val count: Int,
21+
)

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ android {
5959
}
6060

6161
dependencies {
62+
implementation(project(":app-model"))
63+
6264
implementation(platform(libs.androidx.compose.bom))
6365
implementation(libs.androidx.activity.compose)
6466
implementation(libs.androidx.compose.ui)

app/src/main/kotlin/com/skydoves/myapplication/MainActivity.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import androidx.compose.ui.text.style.TextAlign
4747
import androidx.compose.ui.tooling.preview.Preview
4848
import androidx.compose.ui.unit.dp
4949
import androidx.lifecycle.ViewModel
50-
import com.skydoves.compose.stability.runtime.IgnoreStabilityReport
50+
import com.skydoves.myapplication.model.ThirdPartyModel
5151
import com.skydoves.myapplication.models.ImmutableData
5252
import com.skydoves.myapplication.models.MyClass2
5353
import com.skydoves.myapplication.models.NormalClass
@@ -56,7 +56,6 @@ import com.skydoves.myapplication.models.StableSealedClass
5656
import com.skydoves.myapplication.models.StableUser
5757
import com.skydoves.myapplication.models.UnstableUser
5858
import kotlinx.collections.immutable.ImmutableList
59-
import java.lang.StringBuilder
6059

6160
class MainActivity : ComponentActivity() {
6261
override fun onCreate(savedInstanceState: Bundle?) {
@@ -165,6 +164,17 @@ fun StableUserCard(user: StableUser) {
165164
}
166165
}
167166

167+
@Composable
168+
fun ThirdPartyCard(thirdPartyModel: ThirdPartyModel) {
169+
Card {
170+
Column(modifier = Modifier.padding(16.dp)) {
171+
Text("Stable User")
172+
Text("Name: ${thirdPartyModel.name}")
173+
Text("Age: ${thirdPartyModel.count}")
174+
}
175+
}
176+
}
177+
168178
@Composable
169179
fun Card(
170180
modifier: Modifier = Modifier,
@@ -366,7 +376,7 @@ fun ActionButton(
366376
* These are only used in Android Studio previews, not in production.
367377
*/
368378
@com.skydoves.compose.stability.runtime.IgnoreStabilityReport
369-
@androidx.compose.ui.tooling.preview.Preview(showBackground = true)
379+
@Preview(showBackground = true)
370380
@Composable
371381
fun StableUserCardPreview() {
372382
StableUserCard(StableUser("Preview User", 25))

compose-stability-analyzer-idea/CHANGELOG.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

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

5-
## [Unreleased]
6-
7-
---
8-
95
## [0.6.2] - 2025-12-10
106

117
### Fixed
@@ -22,8 +18,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
2218
- Composables with only ignored unstable parameters now correctly show as skippable
2319
- Provides better visibility of composable signatures while respecting ignore patterns
2420

25-
---
26-
2721
## [0.6.1] - 2025-12-06
2822

2923
### Added
@@ -58,8 +52,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
5852
- Compose BOM: 2025.10.01 → 2025.12.00
5953
- JetBrains Compose: 1.9.2 → 1.9.3
6054

61-
---
62-
6355
## [0.6.0] - 2025-11-24
6456

6557
### Added
@@ -87,8 +79,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
8779
- Lists runtime parameters with clear explanation of runtime stability behavior
8880
- Explains that skippability may change between library versions or when implementations change
8981

90-
---
91-
9282
## [0.5.3] - 2025-11-18
9383

9484
### Fixed
@@ -102,8 +92,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
10292
- Tasks no longer access `Task.project` during execution, preventing "unsupported at execution time" errors
10393
- Gradle builds with `--configuration-cache` flag now work correctly
10494

105-
---
106-
10795
## [0.5.2] - 2025-11-13
10896

10997
### Fixed
@@ -115,8 +103,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
115103
- Compile-time classes (`StabilityInfo`, `ComposableInfo`, `ParameterInfo`) now removed by R8
116104
- This fix dramatically reduces release APK size when using the plugin
117105

118-
---
119-
120106
## [0.5.1] - 2025-11-10
121107

122108
### Added
@@ -133,8 +119,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
133119
- Example: `@Immutable sealed class StableSealedClass` with `data class Stable(...)` subclass now correctly shows as STABLE instead of RUNTIME
134120
- Both IDE plugin and compiler plugin now consistently handle sealed class hierarchies with stability annotations
135121

136-
---
137-
138122
## [0.5.0] - 2025-11-08
139123

140124
### Breaking Changes
@@ -187,8 +171,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
187171
- Classes from other modules now correctly marked as UNSTABLE unless annotated with @Stable/@Immutable or @StabilityInferred(parameters=0)
188172
- Extended plugin compatibility range to support IntelliJ IDEA 2025.3 (build 253)
189173

190-
---
191-
192174
## [0.4.2] - 2025-11-03
193175

194176
### Fixed
@@ -202,8 +184,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
202184
- Better handling of complex function type aliases and deeply nested generics
203185
- Consistent stability analysis behavior with compiler plugin
204186

205-
---
206-
207187
## [0.4.1] - 2025-11-02
208188

209189
### Fixed
@@ -219,8 +199,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
219199
- Better handling of complex function type aliases and deeply nested generic types
220200
- @Parcelize-annotated classes with stable properties are now correctly identified as STABLE
221201

222-
---
223-
224202
## [0.4.0] - 2025-11-02
225203

226204
### Added
@@ -238,8 +216,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
238216
- Fixed stability inference for nested data classes
239217
- Improved analysis accuracy for edge cases
240218

241-
---
242-
243219
## [0.3.0] - 2025-10-28
244220

245221
### Added
@@ -257,8 +233,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
257233
- Fixed analysis of @Composable functions with default parameters
258234
- Improved stability detection for complex parameter types
259235

260-
---
261-
262236
## [0.2.3] - 2025-10-23
263237

264238
### Changed
@@ -268,26 +242,20 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
268242
### Fixed
269243
- Fixed compiler test compatibility issues with Kotlin 2.2.21
270244

271-
---
272-
273245
## [0.2.2] - 2025-10-20
274246

275247
### Changed
276248
- Unified maven publishing configuration
277249
- Updated build configuration to match landscapist project structure
278250
- Improved project consistency and maintainability
279251

280-
---
281-
282252
## [0.2.1] - 2025-10-15
283253

284254
### Fixed
285255
- Fixed K2 API compatibility for Android Studio AI-243 and older IDE versions
286256
- Improved graceful fallback to PSI analyzer when K2 Analysis API is unavailable
287257
- Better error handling for unsupported IDE versions
288258

289-
---
290-
291259
## [0.2.0] - 2025-10-10
292260

293261
### Added
@@ -303,8 +271,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
303271
### Changed
304272
- Migrated from PSI-based analysis to K2 Analysis API (with automatic fallback)
305273

306-
---
307-
308274
## [0.1.0] - 2025-10-01
309275

310276
### Added
@@ -321,8 +287,6 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
321287
- Fixed interface type detection
322288
- Improved stability inference accuracy
323289

324-
---
325-
326290
## Legend
327291

328292
- **Added** - New features
@@ -337,4 +301,4 @@ All notable changes to the IntelliJ IDEA plugin will be documented in this file.
337301

338302
- [Plugin Repository](https://github.com/skydoves/compose-stability-analyzer)
339303
- [Issue Tracker](https://github.com/skydoves/compose-stability-analyzer/issues)
340-
- [Documentation](https://github.com/skydoves/compose-stability-analyzer/blob/main/README.md)
304+
- [Documentation](https://github.com/skydoves/compose-stability-analyzer/blob/main/README.md)

0 commit comments

Comments
 (0)