Local classes and anonymous objects are normal classes and
kotlin-reflect can load all declarations and modifiers from them, and
support calling members, exactly in the same way as it does for normal
non-local classes.
#KT-41373 In Progress
kotlin-reflect works correctly already for Kotlin-generated local
classes and anonymous objects, but not for Java ones. This is fixed in a
subsequent commit.
#KT-41373 In Progress
This utils are intended to be used external target authors exclusively
and shall help to create sources.jar files using regular
Kotlin Multiplatform conventions.
^KT-58109 Verification Pending
Note that call-site class has no metadata for inlined local delegated
properties. Thus, for an inlined local delegated property we should
obtain declaration-site class as owner - otherwise, the corresponding
`PropertyReference` will have an owner without property metadata.
Provide an inefficient default implementation and make it "@PublishedApi internal" so it can be safely merged as is.
Intrinsics will be added later in follow-up PRs, and then the implementation will be adjusted accordingly
Merge-request: KT-MR-10843
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Modification registration seems to changed in Java 9. Now if the asked
capacity in `ensureCapacity` function is less than current capacity,
no modification is registered.
When signing is enabled it leads to error
```
Build file '/Users/Shared/Projects/kotlin/libraries/tools/kotlin-gradle-plugin-api/build.gradle.kts' line: 13
Cannot change dependencies of dependency configuration ':kotlin-gradle-plugin-api:commonApi' after it has been included in dependency resolution.
```
When running with
```
gradle :kotlin-test:publish -Psigning.gnupg.keyName=* -Psigning.gnupg.passphrase=* -PsigningRequired=true
```
Problem is reproducible only when singing is enabled.
Register dependencies between publication and signing tasks.
It looks like signing tasks have same output and need to be registered
in all publications.
Error:
* What went wrong:
Some problems were found with the configuration of task ':kotlin-annotation-processing-embeddable:publishMainPublicationToMavenLocal' (type 'PublishToMavenLocal').
- Gradle detected a problem with the following location: '/Users/Shared/Projects/kotlin/plugins/kapt3/kotlin-annotation-processing-embeddable/build/libs/kotlin-annotation-processing-embeddable-1.9.255-SNAPSHOT-sources.jar.asc'.
Reason: Task ':kotlin-annotation-processing-embeddable:publishMainPublicationToMavenLocal' uses this output of task ':kotlin-annotation-processing-embeddable:signGradleCompatPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Reproduce:
gradle :kotlin-annotation-processing-embeddable:publishToMavenLocal -Psigning.gnupg.keyName=* -Psigning.gnupg.passphrase=* -PsigningRequired=true
KTI-1282
Remove dependency to same javadoc jar in all publications as it produces
an implicit dependency to the same signing task. Use different javadoc
tasks instead.
Error:
org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':kotlin-test:signCommonPublication' (type 'Sign').
- Gradle detected a problem with the following location: '/kotlin/libraries/kotlin.test/build/distributions/kotlin-test-1.9.20-dev-0000-javadoc.jar.asc'.
Reason: Task ':kotlin-test:publishAnnotationsCommonPublicationToMavenLocal' uses this output of task ':kotlin-test:signCommonPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Reproduce:
gradle :kotlin-test:publishToMavenLocal -Psigning.gnupg.keyName=***** -Psigning.gnupg.passphrase=**** -PsigningRequired=true
KTI-1282
Otherwise, e.g., if a local type is within an anonymous object, full
class id will include that anonymous object too, resulting in invalid
type signature for PsiType.
^KT-59533 Fixed