206 Commits

Author SHA1 Message Date
Alexey Tsvetkov
938f581a3d Update copyright notices 2021-04-01 23:46:02 +03:00
Alexey Tsvetkov
b00aa7d5d3 Test Gradle plugin with Gradle 7.0
`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
2021-03-22 11:24:35 +03:00
Alexey Tsvetkov
4e673239a7 Split integration and unit Gradle plugin tests
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;
2021-03-22 11:24:35 +03:00
Alexey Tsvetkov
dc428d3a22 Add suggestRuntimeModules task
Resolves #463
2021-03-19 09:17:16 +03:00
Tad Fisher
b9c2f080d9 Fix task validation errors 2021-03-19 06:36:10 +03:00
Alexey Tsvetkov
76cccb93b9 Don't apply Compose compiler plugin to JS and Native compilations
Resolves #352

The fix resolves the issue only for Kotlin compiler builds the following commit:
d023f09bd4

See also https://youtrack.jetbrains.com/issue/KT-45020
2021-03-19 05:02:34 +03:00
Alexey Tsvetkov
ceab5f0979 Escape launcher arguments and JVM arguments with extra quotes
Resolves #465
2021-03-18 09:01:48 +03:00
Alexey Tsvetkov
0314bc4b80 Provide default icon for native distributions
Resolves #274
2021-03-02 11:08:24 +03:00
Nikolay Igotti
2f7f05babd Move to 0.3.2. 2021-03-02 09:51:30 +03:00
Alexey Tsvetkov
2fac821f99 Allow including all runtime modules 2021-03-02 09:10:48 +03:00
Alexey Tsvetkov
a99b3eaa83 Require JDK 15+ for creating native distributions
Resolves #428
2021-03-02 09:10:48 +03:00
Alexey Tsvetkov
30f2934c67 Avoid duplicated logging to file
FilterOutputStream#(ByteArray) delegates to #write(Int)
2021-03-02 09:10:48 +03:00
Alexey Tsvetkov
40f4ad0fa0 Set dock and menu names on macOS (#433)
Resolves #246
2021-02-26 21:12:37 +03:00
Alexey Tsvetkov
2d3a9a20f4 Platform specific customization (#434)
* Provide ability to customize installation path

#314

* Document platform specific options
2021-02-26 21:12:24 +03:00
Alexey Tsvetkov
32935c19a8 Upgrade max Gradle version for tests to 6.8.3 (#437) 2021-02-26 21:12:02 +03:00
Alexey Tsvetkov
d68cb7b68b Test runDistributable with MPP project (#436) 2021-02-26 21:11:40 +03:00
Alexey Tsvetkov
7083376171 Fix runDistributable on Windows (#435)
Resolves #378
2021-02-26 21:11:22 +03:00
Nikolay Igotti
10e99c20d9 Move to 0.3.0. 2021-02-22 13:19:43 +03:00
Alexey Tsvetkov
ff8de6a830 Print notarization status (#406)
* Always write external tool output logs to files

Previous implementation always passed an empty string to `processStdout`,
when verbose mode was used.

* Print notarization status in non-verbose mode too
2021-02-21 11:47:47 +03:00
Alexey Tsvetkov
0dd5d7fd46 Validate versions for native distributables (#405)
Resolves #91, resolves #205, resolves #341, resolves #393
2021-02-20 20:21:36 +03:00
Igor Demin
c7a4494269 Merge pull request #399 from JetBrains/replace-androidx-artifacts
Gradle plugin. Replace 'androidx.compose' artifacts by 'org.jetbrains.compose' artifacts.
2021-02-20 13:07:05 +03:00
Alexey Tsvetkov
c8a8a462aa Include java.logging module by default (#402)
It is probably frequently needed and relatively small
(the inclusion increases final app size by ~200 kb),
so it can be included by default

Fixes #401
2021-02-20 08:54:35 +03:00
Igor Demin
48b52e459a Gradle plugin. Replace 'androidx.compose' artifacts by 'org.jetbrains.compose' artifacts.
Fixes https://github.com/JetBrains/compose-jb/issues/272
2021-02-18 10:04:12 +03:00
Alexey Tsvetkov
ceaf3d3065 Enable verbose logging for tests 2021-02-17 11:41:43 +03:00
Alexey Tsvetkov
6c7dc220b2 Use correct package name in Linux test 2021-02-17 11:41:43 +03:00
Alexey Tsvetkov
9fcf0735eb Improve diagnosing problems with external tools
* Fix passing 'compose.desktop.verbose' to jlink/jpackage
* Save external tools logs to files in non-verbose mode
2021-02-16 16:33:29 +03:00
Alexey Tsvetkov
f7feef4cc6 Check notarization status without triggering new notarization upload 2021-02-16 16:10:23 +03:00
Alexey Tsvetkov
d758b6b476 Another try at fixing Linux tests 2021-02-16 16:09:53 +03:00
Alexey Tsvetkov
77387f3abb Fix dependencies clash when packaging
Fixes #319
2021-02-16 16:09:35 +03:00
Alexey Tsvetkov
b8545e4d6f Fix gradle plugin tests (#350)
* 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
2021-02-05 09:11:03 +03:00
Alexey Tsvetkov
c243639042 Support simplified sign and notarization for macOS distribution in Gradle plugin (#332) 2021-02-02 14:13:34 +03:00
Alexey Tsvetkov
f627c0cc55 Use correct test scenario for uber jar tests 2021-01-25 18:11:59 +03:00
Alexey Tsvetkov
0d68dea6de Filter out non-jar files in runtime classpath
WiX linker fails to find class files of inlined functions for some reason
(maybe because of '$' character in name or long paths)

Fixes #196
2021-01-25 17:32:09 +03:00
Alexey Tsvetkov
abb4a5a411 Avoid adding incompatible arguments when creating application image
Fixes https://github.com/JetBrains/compose-jb/issues/296
2021-01-25 10:17:10 +03:00
Alexey Tsvetkov
e6fb7463d0 Normalize all file properties on Windows
Previously the `--output` argument of the jlink task was not normalized.

https://github.com/JetBrains/compose-jb/issues/248
2021-01-22 09:48:46 +03:00
Alexey Tsvetkov
7e243b5cbd Extract runtime image creation into separate task
This change speeds up incremental build of
an application image.
For example, for one (relatively small) tested application
the overall time spent on creating binary images in incremental case
(after one file change) went from ~5 seconds down to 1.4 seconds
(non-rigorous benchmark using a relatively fast 8-core 2.3Ghz i9 MBP).
2020-12-28 11:27:28 +03:00
Alexey Tsvetkov
b915b44d04 Add option to preserve working dir after build
Useful for troubleshooting and experimentation
(e.g. re-run tool in CLI with different args).

To enable:
* Add 'compose.preserve.working.dir=true' to gradle.properties;
* Add '-Pcompose.preserve.working.dir=true' to CLI args.
2020-12-28 11:27:28 +03:00
Alexey Tsvetkov
3aff8f47e3 Add ability to create/run distributable app 2020-12-28 11:27:28 +03:00
Alexey Tsvetkov
d4e423e98f Implement packaging uber jar for current OS (#145) 2020-11-30 13:28:27 +03:00
Alexey Tsvetkov
a71e6b6378 Add OS arch to plugin provided dependencies (#113)
* Add OS arch to plugin provided dependencies

* Delete DesktopDependencies#all
2020-11-19 14:23:41 +03:00
Alexey Tsvetkov
3e74b43cc6 Use Kotlin 1.4.0 in Gradle tests 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
2e1266984e Allow running Gradle tests with any JDK >= 14 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
215e9d66bc Mention compatible Gradle versions in docs 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
6991b4f5de Include min task version in all checks 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
b601ed9693 Print Gradle version used in tests
Also switch to JUnit 5, because the feature is not supported by JUnit 4
2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
fbc51e4019 Test plugin against multiple versions of Gradle 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
f46a39cd6a Add Gradle plugin integration tests 2020-11-16 16:22:42 +03:00
Alexey Tsvetkov
bef34ad7d2 Add compose Gradle extension to dependency blocks
Before this change, the following Groovy DSL code would not work:
```
dependency {
  implementation compose.desktop.currentOS
}

// or

kotlin {
    jvm { withJava() }
    sourceSets {
        named("jvmMain") {
            dependencies {
                implementation(compose.desktop.currentOs)
            }
        }
    }
}
```
2020-11-13 13:43:40 +03:00
Alexey Tsvetkov
455814b9d3 Fix compile error
For some reason, the compiler failed to resolve the method reference correctly.
Also minor fix for `executable` property (the code was red in IDE, but compiled).
2020-11-09 13:01:04 +03:00
Eliezer Graber
56da868a05 Fix a crash when building using Gradle 6.6+ 2020-11-08 17:20:13 -05:00