Skip to content

Depend on collection/annotation project instead of an artifact #1945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Mar 24, 2025

  1. :graphics:graphics-shapes:compileKotlinLinuxX64 currently fails:
> Task :graphics:graphics-shapes:compileKotlinLinuxX64 FAILED
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:53:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:54:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:83:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:84:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:283:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:20:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:38:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:273:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:278:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:279:6 Unresolved reference 'FloatRange'.

This task is called on klibApiCheck task (used in https://youtrack.jetbrains.com/issue/CMP-6675/Run-binary-compatibility-validator-for-iOS), even if there is a redirection (seems a bug in the redirected androidx.annotation:1.8.0, which is fixed in 1.8.2)

  1. We need to exclude all dependencies on artifacts because someday it won't be compatible with androidx. If we start to depend on it now, 1.8.0 will be compatible at the moment we remove internal dependencies

Testing

  1. CI checks

  2. :graphics:graphics-shapes:compileKotlinLinuxX64 doesn't fail

Release Notes

N/A

1. ``:graphics:graphics-shapes:compileKotlinLinuxX64` is currently fails:
```
> Task :graphics:graphics-shapes:compileKotlinLinuxX64 FAILED
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:53:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:54:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:83:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:84:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:283:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:20:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:38:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:273:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:278:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:279:6 Unresolved reference 'FloatRange'.
```
This task is called on `klibApiCheck` task (used in https://youtrack.jetbrains.com/issue/CMP-6675/Run-binary-compatibility-validator-for-iOS), even if there is redirection (seems a bug in androidx.annotation:1.8.0, which is fixed in 1.8.2)

2. We need to exclude all dependencies on artifacts, because someday, it won't be compatible with `androidx`, and we need to start to depend on it now

## Release Notes
N/A
@igordmn igordmn requested a review from eymar March 24, 2025 00:47
@igordmn igordmn changed the title Depend on project collection/annotation instead of an artifact Depend on collection/annotation project instead of an artifact Mar 24, 2025
@igordmn igordmn merged commit 0edb57f into jb-main Mar 24, 2025
17 checks passed
@igordmn igordmn deleted the igor.demin/fix-annotation-dependency branch March 24, 2025 12:50
igordmn added a commit that referenced this pull request Apr 10, 2025
1. `:graphics:graphics-shapes:compileKotlinLinuxX64` currently fails:
```
> Task :graphics:graphics-shapes:compileKotlinLinuxX64 FAILED
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:53:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:54:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:83:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:84:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:283:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:20:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:38:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:273:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:278:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:279:6 Unresolved reference 'FloatRange'.
```
This task is called on `klibApiCheck` task (used in
https://youtrack.jetbrains.com/issue/CMP-6675/Run-binary-compatibility-validator-for-iOS),
even if there is a redirection (seems a bug in the redirected
androidx.annotation:1.8.0, which is fixed in 1.8.2)

2. We need to exclude all dependencies on artifacts because someday it
won't be compatible with `androidx`. If we start to depend on it now,
1.8.0 will be compatible at the moment we remove internal dependencies

## Testing
1. CI checks

2. `:graphics:graphics-shapes:compileKotlinLinuxX64` doesn't fail

## Release Notes
N/A
igordmn added a commit that referenced this pull request Apr 11, 2025
1. `:graphics:graphics-shapes:compileKotlinLinuxX64` currently fails:
```
> Task :graphics:graphics-shapes:compileKotlinLinuxX64 FAILED
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:53:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/CornerRounding.kt:54:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:83:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/PolygonMeasure.kt:84:10 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt:283:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:19:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:20:17 Unresolved reference 'annotation'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:38:6 Illegal annotation class 'IntRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:273:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:278:6 Unresolved reference 'FloatRange'.
e: file:///D:/Work/compose-multiplatform-core/graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/Shapes.kt:279:6 Unresolved reference 'FloatRange'.
```
This task is called on `klibApiCheck` task (used in
https://youtrack.jetbrains.com/issue/CMP-6675/Run-binary-compatibility-validator-for-iOS),
even if there is a redirection (seems a bug in the redirected
androidx.annotation:1.8.0, which is fixed in 1.8.2)

2. We need to exclude all dependencies on artifacts because someday it
won't be compatible with `androidx`. If we start to depend on it now,
1.8.0 will be compatible at the moment we remove internal dependencies

## Testing
1. CI checks

2. `:graphics:graphics-shapes:compileKotlinLinuxX64` doesn't fail

## Release Notes
N/A
igordmn added a commit that referenced this pull request Apr 11, 2025
Fixes
https://youtrack.jetbrains.com/issue/CMP-7918/Inconsistent-source-with-NavigationSuiteScaffold-in-1.8.0-beta01

Continuation of
#1868

There are more folders that also use Material3 version:
```
git checkout --no-overlay v1.7.3 -- compose/material3/material3-window-size-class
git checkout --no-overlay v1.7.3 -- compose/material3/material3-common
git checkout --no-overlay v1.7.3 -- compose/material3/material3-adaptive-navigation-suite
```

From:
```
$ git log origin/jb-main --not v1.7.3 --not origin/integration --not aosp/androidx-main --oneline -- compose/material3/material3-adaptive-navigation-suite
a75f494 Merge branch 'jb-main' into integration
3e4c674 Support API dumping for Klibs (#1947)
c1a20ec Merge branch 'jb-main' into integration
0edb57f Depend on collection/annotation `project` instead of an artifact (#1945)
e3e9ddc Merge commit '7a145e052ae61e272e91ffe285e9451b8ab71870' into integration
a273606 (tag: v1.8.0+dev2134) Fix Compose usage in non-Gradle Desktop projects (#1872)
4818376 Copy compose-material3 from e545e49
de5792a Copy compose-material3 from 1469382
f56f6e7 Update kotlin version to 2.1.0 (#1778)
330c557 Copy compose-material3 from fccc3e0
b6eba02 (tag: v1.8.0-alpha01, tag: v1.8.0+dev1955) Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies (#1696)
38bd05f Copy compose-material3 from 0c5014a

$ git log origin/jb-main --not v1.7.3 --not origin/integration --not aosp/androidx-main --oneline -- compose/material3/material3-common
47911ee Restore stubs from commit '78132378b67c86698d1ade3dc368c9f15d738a71' to avoid conflicts
a75f494 Merge branch 'jb-main' into integration
3e4c674 Support API dumping for Klibs (#1947)
e3e9ddc Merge commit '7a145e052ae61e272e91ffe285e9451b8ab71870' into integration
a273606 (tag: v1.8.0+dev2134) Fix Compose usage in non-Gradle Desktop projects (#1872)
551007f Reimplement js and was identityHashCode family of implementations with WeakMap (#1752)
330c557 Copy compose-material3 from fccc3e0
38bd05f Copy compose-material3 from 0c5014a

$ git log origin/jb-main --not v1.7.3 --not origin/integration --not aosp/androidx-main --oneline -- compose/material3/material3-window-size-class
47911ee Restore stubs from commit '78132378b67c86698d1ade3dc368c9f15d738a71' to avoid conflicts
a75f494 Merge branch 'jb-main' into integration
3e4c674 Support API dumping for Klibs (#1947)
e3e9ddc Merge commit '7a145e052ae61e272e91ffe285e9451b8ab71870' into integration
a273606 (tag: v1.8.0+dev2134) Fix Compose usage in non-Gradle Desktop projects (#1872)
38bd05f Copy compose-material3 from 0c5014a
```
I chose to cherry-pick:
```
3e4c674 Support API dumping for Klibs (#1947)
0edb57f Depend on collection/annotation `project` instead of an artifact (#1945)
a273606 (tag: v1.8.0+dev2134) Fix Compose usage in non-Gradle Desktop projects (#1872)
f56f6e7 Update kotlin version to 2.1.0 (#1778)
b6eba02 (tag: v1.8.0-alpha01, tag: v1.8.0+dev1955) Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies (#1696)
551007f Reimplement js and was identityHashCode family of implementations with WeakMap (#1752)
```

## Release Notes
### Fixes - Multiple Platforms
- _(prerelease fix)_
`org.jetbrains.compose.material3:material3-adaptive-navigation-suite`,
`org.jetbrains.compose.material3:material3-window-size-class` are
reverted to the 1.3.1 state. They will be reverted to 1.4 in CMP 1.9
with material3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants