There are two types of Gradle tests:
* integration tests (:compose:testGradle-<GRADLE_VERSION>);
* unit tests (:compose:test);
There is a custom test name generator (GradleTestNameGenerator),
which prints current version of Gradle for integration tests.
During unit tests execution, GradleTestNameGenerator failed
with NPE, because the 'gradle.version.for.tests' system property
was not set. NPE did not crash the test suite,
but it was printed to stderr.
When users run/package application we will configure Compose to work as standalone application.
It means we will override some global Swing properties in Compose initialization function:
- sets system property `apple.laf.useScreenMenuBar` to true
- sets system property `sun.java2d.uiScale`/`sun.java2d.uiScale.enabled` automatically on Linux
- sets UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
When users don't use those tasks (when they use Compose in an existing Swing application, or in an IDEA plugin),
this property will not be set, and so we will not override Swing globals.
* Replace usage of 'de.fuerstenau.buildconfig'
with a custom replacement, because the plugin
does not support Gradle 7.0+ and
there has not been any commit activity in 5 years
(https://github.com/mfuerstenau/gradle-buildconfig-plugin);
* Update 'com.github.johnrengelman.shadow' to 7.0.0
The build `0.4.0-build182` upgrades
`kotlinx-collections-immutable` library
(which is used by the compose runtime) to 0.3.4,
which was published to maven central,
so most usages of sunsetting jcenter repo
can be removed now.
Resolves#557
`withJava()` is removed from MPP test, because our tests don't contain Java,
but the latest stable version of Kotlin fails with exceptions,
when Gradle 7.0 is used. The issue is fixed in Kotlin's master:
297aa17b6e
Previously some tests (e.g. FileHashTest) were executed
multiple times in each test task.
This change splits tests in the following way:
* `testGradle-<VERSION>` task only runs `org.jetbrains.compose.gradle.*` tests
with the corresponding Gradle version;
* `test` runs all other tests once;
* `check` runs all tests and checks;
* Fix uninitialized lateinit var property exceptions on Linux and Windows
lateinit property nonValidatedMacSigningSettings
was not initialized on Linux and Windows
* Revert reusing app image when creating installer
Previously there was a change to reuse an app image, when creating an installer.
So packaging would happen in two steps:
1. jpackage --type app-image ...
2. jpackage --type msi --app-image /path/to/app/image ...
This way a user could always conveniently inspect, what goes into an installer.
However, that change lead to bizzare crashes on Windows and Linux.
As a workaround, this change reverts reusing an app image,
when creating an installer.
* Fix args filtering when invoking jpackage
"app-image" args can also be used, when creating an installer
w/o predefined app image (e.g. w/o `--app-image ...` argument)
* Fix deb package name for tests on Linux