This template provides all infrastructure to write Kotlin scripts for
build regression benchmarks. These benchmarks will use gradle-profiler
to run provided scenarios on user projects. All benchmark results
in the script then will be aggregated into single one showing
difference between them.
Generally such kind of benchmarks should be used to track early Gradle
build regressions between releases.
^KT-49921 In Progress
Java protobufs generate a lot of inner classes and when compiling
Kotlin wrappers for those Java protobufs the inner classes can
be loaded hundreds of times leading to out of memory. This change
avoids reloading by fixing a bug in the cache implementation that
caused inner classes to not be cached.
After shadow is updated to 7.1.1, library ComponentsXmlResourceTransformer
should work fine.
The only reason for this patched version was the bug that was fixed in 7.1.0:
https://github.com/johnrengelman/shadow/releases/tag/7.1.0
^KTI-733 Fixed
Version 7.1.1 is absent in jcenter, so additional repository was added
in some modules.
Leave old version in NewMultiplatformIT.kt because of
`This version of Shadow supports Gradle 7.0+ only. Please upgrade.` error.
^KTI-733 Fixed
..to correctly pass the dependencies in the ExecuteKotlinScriptMojo.
#KT-50306 fixed
Also add a test that a script has access to plugin-configured
dependencies.
If plugin/dependencies is populated, the extra artifacts should be
made available when the script is run. This test uses 'junit' simply
because it's commonly-used, but not already present, or shaded as part
of another artifact.
There are number of problems with up-to-date checks in tests, leading to
a test binary not being rebuilt or rerun when a developer expects it to.
Things became worse after updating to Gradle 7+:
test binary run tasks are considered up-to-date if the test data
has been changed, even after clean.
Even before Gradle 7+, we've observed other similar undesirable effects:
for example, if the compiler has been changed, tasks building
test binaries are still up-to-date.
So it was decided to workaround all possible similar problems by forcing
all test tasks in the :native:native.tests project to be not up-to-date.
This project should contain only test tasks, so this workaround
seems pretty natural -- it is just "tests aren't up-to-date".
Sometimes, the launched test process can't finish on Windows if stdout and stderr threads are not read completely. The proper approach here would be to spawn two threads for constantly reading stdout & stderr while the process in being executed.