Commit Graph

1798 Commits

Author SHA1 Message Date
Nikita Lipsky
e3382dba2a Rename xcode projects to iosApp and remove ios run configurations (#2629) 2023-01-13 11:02:00 +02:00
Alexey Tsvetkov
472ef34fc3 Fix configuration cache issues (#2607)
Fixes #2587

* Test Gradle 7.6+ with configuration cache by default

* Make unpacking wasm runtime configuration cache compatible

* Make ProGuard integration configuration cache compatible

* Fix unresolved reference

* Fix configuration cache exception on macOS
2023-01-11 08:46:40 +01:00
Alexey Tsvetkov
57348cbde3 Fix running unsigned apps locally on macOS Ventura (#2617)
Normally macOS Gatekeeper does not allow unsigned apps to run.
However, apps created on the same machine were allowed to run.
This allows developers to test package apps on their machines
without configuring Apple Developer ID.

Previously, the Compose Multiplatform Gradle plugin
simply did not do anything, when the signing was not configured.
However, in macOS Ventura the Gatekeeper checks
became stricker, so "unsigned" packaged apps started to
be shown as "damaged".

This seems to happen, because parts of a final app image
were signed. Also they were signed by different certificates
(a runtime image could be signed by a runtime vendor,
while Skiko binary is signed by JetBrains).

This change removes all signatures if signing is not configured.

See also https://bugs.openjdk.org/browse/JDK-8276150

Fixes #2476
2023-01-10 21:08:28 +01:00
Nikita Lipsky
e30aaf6371 Move chat-mpp to KMM project structure (#2620) 2023-01-10 15:33:31 +02:00
Nikita Lipsky
23e6c6ba4b Move Minesweeper to KMM project structure and load resources the same way for all platforms (#2619) 2023-01-10 12:38:34 +02:00
Alexey Tsvetkov
4f1bb98711 Remove usages of internal Gradle API FileOperations (#2606) 2023-01-09 12:27:11 +01:00
Thomas Vos
752815d96a Improve documentation for signing on macOS (#2591)
* Improve documentation for signing on macOS

* fixup! Improve documentation for signing on macOS
2023-01-07 09:09:02 +01:00
Christian De Angelis
d79b793131 Add task dependency on unpacking wasm. (#2589)
The `jsProcessResources` task needs to depend on the
`unpackSkikoWasmRuntimeJs` task since it explicitly consumes one of its
outputs. Otherwise, a Gradle warning occurs during compilation that task
execution optimizations have been disabled.
2023-01-02 16:44:35 +01:00
Lee Taehoon
d6ff80c062 Imageviewer Bitmap Filter for uikit (#2575) 2022-12-26 11:34:19 +03:00
Emre Şafak
caea52c922 Correct typo in README.md (#2576)
Correct typo in "Compatability"
2022-12-26 11:04:27 +03:00
Nikita Lipsky
55d97d0091 Move visual-effects sample to KMM structure and add Android/iOS targets (#2573)
* Put all samples to one with a simple navigation

* Move desktop dependencies to main.kt and Wave settings panel to a separate class

* Use common resource API instead of desktop only for RotatingWords

* Move project to KMM structure and add iOS/Android target

* Change year for Happy New Year!

* Correct README.md
2022-12-23 14:07:01 +02:00
dima.avdeev
327fa12651 fix imageviewer uikit (#2574) 2022-12-23 14:18:34 +03:00
Nikita Lipsky
c67820e07a Put visual-effects sample to experimental as is. (#2572)
To add Android/iOS targets later
2022-12-22 23:12:18 +02:00
dima.avdeev
a9ac7634cd Add uikit to experimental/examples/imageviewer (#2571) 2022-12-22 22:18:20 +03:00
Oleksandr Karpovich
d645b08e4e Update CHANGELOG.md 2022-12-16 12:17:14 +01:00
Oleksandr Karpovich
a1d7db7398 Compose Web: add tests to check Stability inference (by counting recompositions) (#2545) 2022-12-16 11:00:06 +01:00
Igor Demin
eb60a5bf20 Update README about using custom Compose Compiler (#2526)
* Update README about using custom Compose Compiler

* Update VERSIONING.md
2022-12-15 04:19:41 +01:00
Igor Demin
be0c1c87e1 Release 1.2.2 (#2561)
* Compose 1.2.1-rc01

* Fix Web build for Kotlin 1.7.20

* Use 1.3.2.1-rc02 in Gradle plugin

* Fix Gradle Plugin tests

* Fix Gradle Plugin tests

* Compose 1.2.1-rc03

* Update CHANGELOG.md

* Update CHANGELOG.md

* Compose Compiler 1.3.2.1

* Compose 1.2.1

* Update VERSIONING.md

* Update gradle.properties

* Fix custom JDK tests on Linux

* Remove JVM target version override (#2515)

Previously, we were setting kotlin.jvmTarget version
to 1.8 if it was null or < 1.8.
As an unintended consequence we were also overriding
a version set by the jvmToolchain property.
So while users expected the jvmToolchain property
to set both jdk home & jdk target, we were quietly
overriding jdk target.

At the same time, Kotlin 1.7 sets the minimum
target version to 1.8 anyway, so our override
does not make sense with Kotlin 1.7+.

This commit removes overriding altogether.

Fixes #2511

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update Compose

* Update default ProGuard rules with changes from main branch

* Test Gradle plugin on relevant PRs (#2509)

* Update Gradle used in tooling subprojects

* Update Kotlin in Compose Gradle plugin

* Decrease verbosity of Gradle plugin tests

* Disable mac sign test

* Add workflow to test Gradle plugin

* Fix custom jdk tests on Linux

* Make Compose Gradle plugin build compatible with Configuration cache

* Print tests summary

* Remove unused code

* Refactor tests configuration

* Turn off parallel execution

* Try adding windows runner

* Turn off fail fast

* Fix Windows test issues

#2368

* Adjust default proguard rules

The following rule is needed to fix tests on Windows:
```
-dontwarn org.graalvm.compiler.core.aarch64.AArch64NodeMatchRules_MatchStatementSet*
```

Other rules are just to make builds less noisy.
Kotlin's `*.internal` packages often contain
bytecode, which triggers ProGuard's notes.
However, these notes are not actionable for
most users, so we can ignore notes by default.

#2393
# Conflicts:
#	gradle-plugins/gradle/wrapper/gradle-wrapper.properties

* Improve DSL for setting a custom Compose Plugin (#2527)

* Improve DSL for setting a custom Compose Plugin

Fixes https://github.com/JetBrains/compose-jb/issues/2459

Readme: https://github.com/JetBrains/compose-jb/pull/2526

1. Add `dependencies: Dependencies` extension that is accessible in `compose { }` block
2. Add `Dependencies.compiler` property that can return versions of Compose compiler used by the plugin:
```
compose {
    kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.7.20"))
    //kotlinCompilerPlugin.set(dependencies.compiler.auto) // determined by applied version of Kotlin. It is a default.
}
```

3. Add ability to set arguments for Compose Compiler. Now we can write:
```
compose {
    kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.7.20"))
    kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.7.21")
}
```

4. Remove checks for different targets

We had a separate check for JS, when we released 1.2.0. It doesn't support Kotlin 1.7.20 at that moment.

It is hard to refactor this feature in the new code, so I removed it. It is not needed now and it had an ugly code. When we will need it again, we'll write it again.

5. Remove the `compose.tests.androidx.compiler.version` property from gradle.properties and remove `defaultAndroidxCompilerEnvironment`

Because they are used only in one test, and it seems there is no reason to use it in another place in the future

* Discussions

* Update ComposeCompilerCompatability.kt (#2557)

* Update CHANGELOG.md

* 1.2.2-rc01

* Update Compose

* Update CHANGELOG.md

* Compose 1.2.2

* Remove shared.podspec

* Remove usages of deprecated Intellij APIs

Co-authored-by: Alexey Tsvetkov <alexey.tsvetkov@jetbrains.com>
Co-authored-by: Alexey Tsvetkov <654232+AlexeyTsvetkov@users.noreply.github.com>
2022-12-15 01:14:26 +01:00
Igor Demin
bb723f81a9 Update ComposeCompilerCompatability.kt (#2557) 2022-12-13 07:32:13 +01:00
Alexey Tsvetkov
153bf10c56 Revert "Do not render preview if protocol between IJ & Gradle does not match (#2556)"
This reverts commit 15aa81c851.
2022-12-13 07:28:27 +01:00
Igor Demin
bf958eb510 Improve DSL for setting a custom Compose Plugin (#2527)
* Improve DSL for setting a custom Compose Plugin

Fixes https://github.com/JetBrains/compose-jb/issues/2459

Readme: https://github.com/JetBrains/compose-jb/pull/2526

1. Add `dependencies: Dependencies` extension that is accessible in `compose { }` block
2. Add `Dependencies.compiler` property that can return versions of Compose compiler used by the plugin:
```
compose {
    kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.7.20"))
    //kotlinCompilerPlugin.set(dependencies.compiler.auto) // determined by applied version of Kotlin. It is a default.
}
```

3. Add ability to set arguments for Compose Compiler. Now we can write:
```
compose {
    kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.7.20"))
    kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.7.21")
}
```

4. Remove checks for different targets

We had a separate check for JS, when we released 1.2.0. It doesn't support Kotlin 1.7.20 at that moment.

It is hard to refactor this feature in the new code, so I removed it. It is not needed now and it had an ugly code. When we will need it again, we'll write it again.

5. Remove the `compose.tests.androidx.compiler.version` property from gradle.properties and remove `defaultAndroidxCompilerEnvironment`

Because they are used only in one test, and it seems there is no reason to use it in another place in the future

* Discussions
2022-12-13 07:27:33 +01:00
Alexey Tsvetkov
15aa81c851 Do not render preview if protocol between IJ & Gradle does not match (#2556) 2022-12-13 07:22:46 +01:00
Alexey Tsvetkov
d11cda865d Fix deprecated Intellij API usages (#2554)
* Update Intellij Gradle plugin

* Drop support for Intellij < 2021.3

The latest stable Android Studio (Dolphin) is based on 2021.3,
so we can drop support for older versions.

* Remove usages of deprecated Intellij APIs

* Remove upper Intellij version limit
2022-12-12 23:48:47 +01:00
dima.avdeev
590796ddb7 fix widgets gallery uikit target (#2555) 2022-12-12 15:13:25 +03:00
Nikita Lipsky
4987cbdc89 Move CodeViewer to KMM structure + add iOS target (#2544) 2022-12-08 16:20:33 +02:00
dima.avdeev
8d22700079 update submodule compose/frameworks/support to latest jb-main 2022-12-07 13:41:02 +04:00
dima.avdeev
711d93b69d update compose submodule 2022-12-06 18:08:43 +04:00
Nikita Lipsky
43eb4d1ed6 Add Resources.kt implementation for iOS (#2540) 2022-12-06 13:55:56 +02:00
Nikita Lipsky
4ac946cd06 Refactor todoapp-lite to follow KMM structure and add iOS target (#2536) 2022-12-05 14:34:33 +02:00
dima.avdeev
7fce8df5f7 fix examples with Kotlin Native issue (#2534)
Needs mavenCetral at root build.gradle.kts
2022-12-05 12:51:11 +03:00
Nikita Lipsky
4da9f8e79e Copy todoapp-lite to experimental examples as is (#2521)
to add iOS target later
2022-12-01 19:15:23 +02:00
Alexey Tsvetkov
382ad5b78f Test Gradle plugin on relevant PRs (#2509)
* Update Gradle used in tooling subprojects

* Update Kotlin in Compose Gradle plugin

* Decrease verbosity of Gradle plugin tests

* Disable mac sign test

* Add workflow to test Gradle plugin

* Fix custom jdk tests on Linux

* Make Compose Gradle plugin build compatible with Configuration cache

* Print tests summary

* Remove unused code

* Refactor tests configuration

* Turn off parallel execution

* Try adding windows runner

* Turn off fail fast

* Fix Windows test issues

#2368

* Adjust default proguard rules

The following rule is needed to fix tests on Windows:
```
-dontwarn org.graalvm.compiler.core.aarch64.AArch64NodeMatchRules_MatchStatementSet*
```

Other rules are just to make builds less noisy.
Kotlin's `*.internal` packages often contain
bytecode, which triggers ProGuard's notes.
However, these notes are not actionable for
most users, so we can ignore notes by default.

#2393
2022-11-30 14:37:05 +01:00
Alexey Tsvetkov
7e574a07e2 Remove JVM target version override (#2515)
Previously, we were setting kotlin.jvmTarget version
to 1.8 if it was null or < 1.8.
As an unintended consequence we were also overriding
a version set by the jvmToolchain property.
So while users expected the jvmToolchain property
to set both jdk home & jdk target, we were quietly
overriding jdk target.

At the same time, Kotlin 1.7 sets the minimum
target version to 1.8 anyway, so our override
does not make sense with Kotlin 1.7+.

This commit removes overriding altogether.

Fixes #2511
2022-11-29 16:15:14 +01:00
dima.avdeev
75f4f1dee4 add mavenLocal to components (#2516) 2022-11-29 16:24:53 +03:00
Alexey Tsvetkov
297eeacfc2 Configure repositories for all modules (#2510) 2022-11-28 13:28:21 +01:00
Nikita Lipsky
0d6271c7a4 Copy codeviewer from examples to experimental/examples as is (#2508) 2022-11-28 12:24:07 +02:00
dima.avdeev
a052086022 Add compose:material:material-icons-extended (jvm targets) to mavenLocal (#2501) 2022-11-25 22:28:30 +03:00
dima.avdeev
e8786ea73f Copy imageviewer to experimental/examples (#2500) 2022-11-25 17:33:42 +03:00
Parthasarathy
612fab6099 Allow the default window to go fullscreen (#2458)
This is an odd behaviour, but I couldn't find any other solution. If `UILaunchStoryboardName` is present, `UIScreen.mainScreen.bounds` will have proper size instead of a smaller window.
[Reference](https://stackoverflow.com/a/56950026)
2022-11-24 15:52:57 +03:00
Nikita Lipsky
a917c5eb1d Extract plugins versions from root build.gradle.kts
as it was before
2022-11-23 20:01:37 +02:00
dima.avdeev
9f47529634 Describe workaround with Tab navigation and multiline TextField's (#2496) 2022-11-23 20:59:19 +03:00
Nikita Lipsky
596e46fdff Refactor Widgets Gallery sample to use KMM structure and add iOS target (#2491)
Refactor Widgets Gallery sample to use KMM structure and add iOS target
2022-11-23 14:40:16 +02:00
dima.avdeev
0807d06e5d [resources] Missing fixes with Classloader (#2490) 2022-11-22 21:55:53 +03:00
dima.avdeev
b858998310 WebAssembly means "JS in browser with WebAssembly Skia" (#2487) 2022-11-22 15:58:46 +03:00
dima.avdeev
13d1de302c [components/resources] add resource("img.png"). rememberImageBitmap() (#2483) 2022-11-22 15:52:48 +03:00
dima.avdeev
e900f561f2 update experimental/examples/falling-balls (#2486) 2022-11-22 11:26:57 +03:00
Nikita Lipsky
749c9119c1 Fixup for Falling Balls example: fix applicationId for Android 2022-11-21 13:42:35 +02:00
Nikita Lipsky
7bfe7df5d0 Fixup for Falling Balls example: remove jcenter() 2022-11-18 17:12:03 +02:00
Nikita Lipsky
d5ba2e924e Refactor FallingBalls MPP sample to follow KMM project structure. (#2478)
Refactor FallingBalls MPP sample to follow KMM project structure.

- as a result iOS target can be run and debugged using KMM IDE tooling.
2022-11-18 16:05:50 +02:00
Oleksandr Karpovich
ca3c190946 Update kotlin version in web (1.7.10 -> 1.7.20) 2022-11-18 11:56:44 +01:00