- Updated Gradle to support version 9.0.0.
- Improved Compose resource configuration to handle AGP versions below
8.10 with a fallback implementation.
- Bumped Kotlin to 2.2.0 release and updated related dependencies.
- Adjusted tests to reflect changes in AGP-specific behavior and
logging.
Fixes https://youtrack.jetbrains.com/issue/CMP-8771
## Release Notes
### Fixes - Gradle Plugin
- Support `AGP 9.0.0`
Fixes
https://youtrack.jetbrains.com/issue/CMP-7409/Add-a-CI-check-for-PR-containing-Release-Notes
- Add a GitHub workflow that checks Release Notes are correctly added.
Runs automatically on creation and description change
- Move the guide into one file from the PR templates
- Parse categories for the script instead of hardcoding them (to have a
single source of truth in the guide)
- Don't do network requests to avoid rate limit (60 requests per hour),
read the description from the workflow variable
Also added to
[compose-multiplatform-core](https://github.com/JetBrains/compose-multiplatform-core/pull/1900)
## Testing
1. Change Release Notes in this PR
2. CI successes with correct Release Notes
3. CI fails with incorrect ones
(Replace RR by R, otherwise the check picks a wrong section, I think no
need to write additional logic just for this PR)
Correct N/A:
```
## RRelease Notes
N/A
```
Correct change:
```
## RRelease Notes
### Features - iOS
- Simple feature
```
Release notes missing:
```
```
Title is incorrect:
```
## RRelease Note
### Features - iOS
- Simple feature
```
Section isn't standard:
```
## RRelease Notes
### Features - Compose
- Simple feature
```
Items are missing:
```
## RRelease Notes
### Features - iOS
```
Sections are missing:
```
## RRelease Notes
- Simple feature
```
## Testing
Tested for injections
1. For script injection
```
"; echo QQ > prDescription.txt #
```
2. For workflow injection
```
q
run: |
echo "QQ"
```
3. Verified that injection into `changelog.main.kts` isn't possible, as
it doesn't execute anything parsed (including links)
## Release Notes
N/A
Since AGP `8.8.0-alpha08` there was added support generated assets in
the new `androidLibrary` target.
We have to support a new target configuration and work with compose
multiplatform resources
Fixes https://youtrack.jetbrains.com/issue/CMP-6982
## Testing
- Added gradle tests
## Release Notes
### Features - Gradle Plugin
- Support compose resources in `androidLibrary` target
AGP 7 isn't supported by Jetpack Compose 1.7 (which we'll use in CMP
1.7) and by Lifecycle 2.8.
After this CI is merged, I will:
- revert the revert of [the skiko API
fix](https://github.com/JetBrains/compose-multiplatform-core/pull/1328)
in jb-main
- raise the AGP version on TeamCity
### Details
It was discovered after merging [the skiko API
fix](https://github.com/JetBrains/compose-multiplatform-core/pull/1328).
We had `D8: java.lang.NullPointerException` error on TeamCity. After
investigating dependencies, it appears that previous the dependencies
were incorrect:
```
org.jetbrains.compose.material:material -> androidx.compose.material:material:1.6.7 -> androidx.lifecycle:lifecycle-livedata-core:2.6.1
```
And the new are correct, but aren't supported by AGP 7:
```
org.jetbrains.compose.material:material -> org.jetbrains.compose.ui -> org.jetbrains.androidx.lifecycle:lifecycle-common -> androidx.lifecycle:lifecycle-common:2.8.0 -> androidx.lifecycle:lifecycle-livedata-core:2.8.0
```
The dependency chains was printed by this command on the
`commonResources` test project:
```
./gradlew dependencyInsight --configuration demoDebugRuntimeClasspath --dependency androidx.lifecycle:lifecycle-livedata-core
```
## Testing
1. Create a pure Jetpack Compose project via Android Studio Hedgehog |
2023.1.1 Patch 2
2. Set Jetpack Compose to 1.7.0-beta01
3. Downgrade AGP to 7.4.0
4. Run
5. See the error:
```
ERROR:C:\Users\igord\.gradle\caches\transforms-4\7fcc63c0892ce9266300d6463c3c751d\transformed\lifecycle-livedata-core-2.8.0-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform lifecycle-livedata-core-2.8.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\igord\.gradle\caches\transforms-3\4aae1223695d47acd0b149bb5811ca5f\transformed\lifecycle-livedata-core-2.8.0-runtime.jar.
> Error while dexing.
```
6. Change AGP to 8.1.0
7. The run is successful.
## Release Notes
### Breaking changes - Android
- Minimal supported AGP raised to 8.1.0
Motivation: sometimes we push minor commits without a PR, but anyway sometimes they break the tests (or make something incompatible. e.g. versions update)
Previously Compose Multiplatform Gradle plugin required
JDK 15+ for distribution packaging. However, fixing #2867 required
always passing --mac-entitlements to jpackage, which is
only available with JDK 17+.