In publishing, use attribute containers of detached configuration
instead of HierarchyAttributeContainer, which is rejected by Gradle for
not being an AttributeContainerInternal.
Using attributes of a detached configuration is a small and
conservative fix; we may need to either not filter the attributes,
which will lead to [ProjectLocalConfigurations.ATTRIBUTE] being
published in the Gradle module metadata, which will potentially
complicate our attributes schema migration, or create proper,
non-detached configurations for publishing that are separated from the
configurations used for project-to-project dependencies.
Issue #KT-29758 Fixed
Creating javadocJar task for every project produces lots of unnecessary
tasks, some project don't even have code. Jar task without outDir
property set fails idea import with gradle 5.0+
* Due to 'improved POM support' introduced in 5.0, runtime dependencies
of the `compileOnly 'com.android.tools.build:gradle:...'` dependency
were no more transitively available. Add them manually;
* Add `!!` to usages of `resourcesDir`, which became nullable;
* Replace the dropped `classesDir` method usages with reflection;
If kapt is enabled, there are several Kotlin compilation tasks for one source set (stub generator + compile). We should attach the expect sources to all of them.
This also fixes KT-29302 where stub generation is skipped while the
subsequent annotation processing phase anticipates the generated stubs.
This patch addresses cases where kapt.use.worker.api=true. The cases
where kapt.use.worker.api=false are handled in the same place of stub
generation.
#KT-12700 Fixed
To turn build reports, add 'kotlin.build.report.enable=true' to
gradle.properties file
(or pass it in CLI via`-Pkotlin.build.report.enable=true`).
By default build reports are created in
`rootProject/build/reports/kotlin-build`.
Build report dir can be customized via `kotlin.build.report.dir`
property.
CLITool.exec is used in konanc to perform compilation of native project.
Due to some internal limitation, this function runs in separate process.
After this change, there will be a possibility to choose MessageRenderer
used in CLITool.exec via system property
org.jetbrains.kotlin.cliMessageRenderer.
Reviewed at KOTLIN-CR-2698.
In Gradle 5.2 the 'WrapUtil.toNamedDomainObjectSet' method
was removed. This patches replaces usage of this method
with call of the 'Project.container' method.
Issue #KT-29725 Fixed
Earlier the K/N platform libraries were looked for in a local ivy
repository created on basis of a K/N compiler distribution. Such
an approach allowed correctly showing such dependencies in
IDEA using the "group:name:version" format (e.g.
"Kotlin/Native:Accounts:ios_arm64:1.1.1"). But it caused looking
for there libraries in all other declared repositories too
making IDE import slower (see KT-28128).
This patch declares these dependencies as files and gets rid of
the local repo to avoid this problem. The downside of this change
is less informative output in the IDE:
"Kotlin/Native:Accounts:ios_arm64:1.1.1" -> "Accounts".
Issue #KT-28128 Fixed
When the plugin rewrites a POM, it establishes the mapping of the
original Maven coordinates to the modified ones. As one of the steps,
this requires finding the original Maven coordinates to rewrite – these
should be exactly the coordinates that Gradle writes to the POM.
In MPP, these are the coordinates of the 'root' (Gradle module metadata)
publication. If those are modified in the publication, the plugin relies
on delegating to the publication in the root module's SotwareComponent
(the only reasonable fallback is the project's name, and in this case
it obviously doesn't match the Maven artifact ID that was modified).
In 1.3.20, the publication delegate was never assigned. To fix the
issue, it is enough to correctly assign the publication delegate for the
root module's SoftwareComponent.
Issue #KT-29485 Fixed
* Add the extendsFrom relation between the Kotlin MPP compilation's
configurations (`*Api`, `*Implementation`, `*RuntimeOnly`) and
the Android variant's `*Elements` configurations, as those
dependencies currently are not added to the Android source sets and
are thus missing from the published dependencies.
* Fix a `this is KotlinCompilationToRunnableFiles` check that
mistakenly referenced the Project receiver of `whenEvaluated { ... }`
Issue #KT-29476 Fixed
Setting `forkMode` to `ForkMode.NEVER` switches
`isolationMode` to `IsolationMode.CLASSLOADER`.
Classloader isolation mode prevented passing task's
logger to the unit of work.
Also it might resulted in multiple daemon instances starting
in parallel.
This change removes setting `forMode` (it was unnecessary).
Also a logger is used for the fallback message instead of printing it
to stderr. An assertion is added to tests, ensuring that
the fallback does not happen.
#KT-29394 Fixed