it conflicts with the compilation on daemon, so transistion should
be planned accordingly, and now it is not a good time for it.
The most important part of the renaming remains intact.
Partially reverts commit "Rename scripting libs and plugin - invert embeddable suffix"
now regular, unshaded libs, are named with suffix `-unshaded`, while
former `-embeddable` ones named without any suffix. This will encoursge
use of the shaded libs by default, avoiding conflicts with 3-party
libs packed into the `kotlin-compiler`.
Note, that only the "frontline" libs are renamed to avoid switching
problems, the ones that not normally used directly are left as is,
including the `kotlin-compiler` itself.
The build performance information is collected during the build
when the Kotlin Gradle plugin is applied. Only hashed values are
saved if they may contain sensitive information. Numeric metrics
obtained on the basis of user's project are saved with random seed.
Persisted information is saved in gradleUserHomeDir.
#KT-33404 Fixed
Previously `validateTaskProperties` was run with tests
(`test` task depends on `validateTaskProperties` task).
Tests run with `--continue` argument on TeamCity,
so the validation was not failing remote-run builds.
To fix this, make `install` depend on `validateTaskProperties`.
The kotlin-scripting-compiler-impl jar is used in the idea plugin and
therefore should not depend on the cli parts of the compiler to avoid
dependency from the plugin to the kotlin-compiler.jar.
Therefore the cli-dependent parts were moved to the scripting plugin
jar, which is used only in cli compiler based environments.
Also implement required abstractions to allow this movement and
drop some redundant dependencies to the cli parts in other projects.
The kotlin-native-shared artifact includes API allowing
us to work with K/N platforms, hosts, distribution etc.
This patch replaces a dependency on kotlin-native-utils
containing copies of such classes with a dependency on
published kotlin-native-shared in the Gradle plugin and
bundles kotlin-native-shared into the Gradle plugin jar.
Use artifact transforms to capture structure and
dependencies of classpath entries. In the KAPT task
this information is used to compare previous classpath
structure with the current one. Once changed classes are
detected, all classes that transitively depend on those
are identified, and that set is passed to KAPT invocation.
In order to avoid unrelated classpath changes, we record an
ABI snapshot of the classpath entry. This snapshot ignores
all private members, and @Metadata annotation.
#KT-23880
Previously the Kotlin/Native version was hardcoded in sources of the
Gradle plugin. Such an approach is inconvenient when we want to
build Kotlin with a custom K/N version but without changes in sources
(e.g. during CI daily runs).
This patch adds a project property `versions.kotlin-native` which can
be set during build to override Kotlin/Native version. Also this
patch gets rid of hardcoding this version in sources and stores it in
a properties file packed with the Gradle plugin in a jar.
This is the Gradle plugin that does not rely on the
Java model and uses the same Kotlin model
(target – compilation – source set) as MPP does.
Also add JS DCE support for this plugin.
Issue #KT-5756 Fixed
Issue #KT-13256 Fixed
Issue #KT-16355 Fixed
Issue #KT-20156 Fixed
Issue #KT-29284 Fixed
This patch adds a separate Gradle plugin allowing
a user to import Kotlin/Native modules in Cocoapods
projects and use Cocoapods dependencies in Kotlin
code via cinterop.
The plugin when applied does the following things:
1. Add a framework binary for each supported (iOS
or macOS) platform in the project.
2. Add a Cocoapods extension allowing one to configure
Cocoapods dependencies of the project.
3. Create cinterop tasks for each dependency from the
previous point. The tasks are added for main
compilations of each supported platform.
4. Add a task to generate a podspec-file which includes
the framework from the point 1, script to
build it and dependencies from the point 2.
So the Cocoapods import procedure is the following:
1. A user runs `./gradlew generatePodspec`. The plugin
creates a podspec-file with all dependencies.
2. The user adds a dependency on this podspec in his Podfile
and runs `pod install`. Cocoapods downloads dependencies
and configures user's XCode project.
3. The user runs XCode build. XCode builds dependencies and then
runs Gradle build. Gradle performs interop processing and
builds the Kotlin framework. Compiler options and header
search paths are passed in the Gradle from XCode environment
variables. After that the final application is built by XCode.
Issue #KT-30269 Fixed
With gradle > 5.0 `publish()` helper call should be done before
`noDefaultJar()` or any other artifact hacks, otherwise singing plugin doesn't sign any jars
* 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;