53 Commits

Author SHA1 Message Date
dima.avdeev
76f000611d Update examples to Compose 1.4.0 (#3042) 2023-04-12 09:18:25 +03:00
Oleksandr Karpovich
cf7bdaa352 Use compose compiler 1.4.5 with kotlin 1.8.20 (#3031) 2023-04-11 14:34:44 +02:00
Alexey Tsvetkov
9540cdcf79 Require JDK 17 for packaging (#3027)
Previously Compose Multiplatform Gradle plugin required
JDK 15+ for distribution packaging. However, fixing #2867 required
always passing --mac-entitlements to jpackage, which is
only available with JDK 17+.
2023-04-11 11:43:29 +02:00
Igor Demin
9fc6763b79 Update ComposeCompilerCompatibility.kt (#3006)
* Update ComposeCompilerCompatibility.kt

* compose.tests.compiler.version=1.4.5-rc03
2023-04-07 11:56:15 +02:00
Igor Demin
1fbeced85b Support Kotlin 1.8.20 (#3000)
* Support Kotlin 1.8.20

* Use Compiler 1.4.5-rc01 for Gradle tests

* Update ComposeCompilerCompatibility.kt
2023-04-06 22:06:02 +02:00
Oleksandr Karpovich
0b429b6ac9 Update all versions for 1.3.1 + update Changelog (#2856)
* Add changes for 1.3.1 + update Changelog

Versions:
compose 1.3.1
kotlin 1.8.10
compiler: 1.4.2

* revert version update in experimental examples

* Update CHANGELOG.md
2023-03-10 09:53:41 +01:00
Oleksandr Karpovich
bc6d42ef44 Update versions: compose - 1.3.0 and kotlin - 1.8.0 (#2651)
* Update versions in examples

* Add more scripts to validate example on android and k/js

* Add validateExamplesIos.sh

* Update CHANGELOG.md for 1.3.0

* check examples with 1.3.0-rc06

* Update the versions: compose-multiplatform - 1.3.0, kotlin - 1.8.0

* Update ComposeCompilerCompatibility (1.4.0)

* Update web/yarn.lock
2023-01-30 21:02:23 +01:00
Alexey Tsvetkov
c3726347ef Test with Gradle 8-RC-1 (#2621)
* Test with Gradle 8-RC-1

* Fix Gradle tests for 8.0-rc-1
2023-01-16 14:41:44 +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
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
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
Igor Demin
63846c63c0 Compose 1.2.1 (#2453) 2022-11-07 14:46:37 +01:00
Igor Demin
0c8c752266 Fix kotlinCompilerPlugin property (#2396)
* Fix `kotlinCompilerPlugin` property

[Support multiple versions of Kotlin PR](https://github.com/JetBrains/compose-jb/pull/2366) breaks `kotlinCompilerPlugin` feature.

`customPluginString` isn't set at the moment of plugin applying (or Provider's initialization), so we need to read it only when the artifact is requested.

* Refactoring
2022-10-24 16:20:13 +02:00
Igor Demin
4ee708c598 Upgrade examples to Compose 1.2.0 2022-10-11 21:20:53 +02:00
Igor Demin
37e33fba29 Compose 1.2.0-rc02 2022-10-11 17:49:48 +02:00
Igor Demin
7ad4492f43 Migrate to 1.2.0-rc01 (#2382) 2022-10-10 16:40:04 +02:00
Igor Demin
4dd1c4a483 Update Compose Compiler version to stable (#2381) 2022-10-10 15:42:01 +03:00
Igor Demin
3996233b03 Allow to use Compose on multiple Kotlin versions (#2366)
JS target supports a lower version (1.7.10), because we have a bug in Koltin 1.7.20

Compose 1.2.0 will support:

1.7.20 and 1.7.10 for Android and Desktop
1.7.10 for JS
We will release the new patchset (1.2.1) with 1.7.2X support for JS later
2022-10-08 15:50:51 +02:00
Igor Demin
a4fd8f7e25 Support Kotlin 1.7.20 (#2357)
* Examples. Visual-effects. Add missing .gitignore

* Support Kotlin 1.7.20
2022-10-05 00:38:06 +02:00
Alexey Tsvetkov
58b0a22fb5 Allow customizing Compose compiler plugin (#2347)
By default, the Compose Multiplatform Gradle plugin
uses `org.jetbrains.compose.compiler:compiler:<COMPOSE_VERSION>`
as a compiler plugin .
However, a new version of Kotlin might be incompatible with
the default version of compiler plugin. Previously, that forced
users to update to a new version of Compose Gradle plugin & Compose libraries
in order to use a new version of Kotlin. Accordingly, Compose framework developers
had to release a new version of all libraries, when a new version of Kotlin is released.

Some time ago the Compose team at Google made it possible to update a compiler plugin
without updating the Gradle plugin and/or all Compose libraries
https://developer.android.com/jetpack/androidx/releases/compose-kotlin

This change allows to specify a custom compiler artifact by using the following DSL:
```
compose {
    kotlinCompilerPlugin.set("<VERSION<")
    // or
    kotlinCompilerPlugin.set("<GROUP_ID>:<ARTIFACT_ID>:<VERSION>")
}
```
2022-10-04 06:02:28 +02:00
Alexey Tsvetkov
d9de125127 Introduce ProGuard integration for Compose/Desktop packaging (#2313)
Resolves #1174
2022-09-14 18:23:40 +03:00
Igor Demin
33237b662e Use another version of Compose Compiler inside Compose Gradle plugin (#2256)
* Use another version of Compose Compiler inside Compose Gradle plugin

* Update gradle.properties
2022-08-23 01:29:22 +02:00
Alexey Tsvetkov
f281b75f77 Update default Kotlin and Compose versions in Gradle tests (#2030) 2022-04-21 19:58:20 +03:00
Nikolay Igotti
4af260d36a Move to 1.1.0 (#1882)
Co-authored-by: Roman Sedaikin <roman.sedaikin@jetbrains.com>
Co-authored-by: Igor Demin <igordmn@gmail.com>
2022-02-25 20:48:49 +03:00
Alexey Tsvetkov
4854bf5714 Fix JS Gradle test (#1760)
* Fix Gradle JS tests

* Use Gradle 7.3.3 instead of 7.3 in tests
2022-01-28 11:19:19 +03:00
Alexey Tsvetkov
47214264ba Remove compose.with.web flag (#1697) 2022-01-14 20:20:10 +03:00
Alexey Tsvetkov
8ff2a324b6 More CI fixes (#1649)
* Update Kotlin in SplitPane component

* Use skiko-awt-* artifacts instead of skiko-jvm-*
2021-12-30 09:32:56 +03:00
Oleksandr Karpovich
e902beeece release 1.0.1-rc2 with 1.6.10 (#1590)
* move to kotlin 1.6.10-RC and corresponding compose commit

* Update path to the karma plugin we are patching

* Add ExperimentalComposeWebStyleApi

what worries me that this actually shows that there are some cases where without any changes apart version compiler people will have to worry about such annotations

* update kotlin version in templates to adopt 1.6.10-RC

* web: move ComposableWithNullableTypeParameter.kt to passing test cases

* update kotlin version in other places

* update imageviewer example: add OptIn for experimental API

* move compose

* move to kotlin 1.6.10 and corresponding compose

* move to kotlin 1.6.10 and corresponding compose

* move to 1.0.1-rc2

* move to 1.0.1-rc2 (todoapp)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
Co-authored-by: Shagen Ogandzhanian <shagen.ogandzhanian@jetbrains.com>
2021-12-14 15:19:20 +01:00
Igor Demin
dbd0a21949 Modify replace.sh for replacing Compose version (#1511)
Remove:
```
__LATEST_COMPOSE_RELEASE_VERSION__
__KOTLIN_COMPOSE_VERSION__
System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION")
```

They pollute templates/examples.

Now, all paths where we need to change the version are hardcoded in the script.

Usage:
```
./replace.sh 1.0.0-rc6
```

This script is planned to run on CI

In the future I will add support for changing Kotlin version
2021-12-08 10:32:18 +03:00
Igor Demin
559e9364f1 Move examples to 1.0.0 (#1524) 2021-12-01 20:23:48 +03:00
Igor Demin
21473b13f1 Move to 1.0.0-rc12 (#1518)
* Move build_from_cli

* Migrate to 1.0.0-rc12

* Comment about LWJGL

* Update Tutorials
2021-12-01 15:37:02 +03:00
Alexey Tsvetkov
785ab617b6 Fix compiling and running Gradle tests (#1312)
* Tests stopped compiling after preview RPC was embedded,
because compileOnly dependencies are not visible to tests;
* Local test runs were broken, because the default
compose.version (1.0.0-alpha4-build328) is not compatible
with Kotlin 1.5.31 (compose.version is always overridden on CI,
so CI runs work);
2021-10-26 11:03:02 +03:00
Igor Demin
a8bc62c519 Migrate to 1.0.0-alpha4-build328 2021-08-27 23:29:58 +03:00
Igor Demin
c9a7b15e86 Migrate to Kotlin 1.5.30 2021-08-27 20:40:51 +03:00
Igor Demin
581b5f0b0a Update Compose + Migrate to 0.5.0-build262 / Kotlin 1.5.21 (#916) 2021-07-21 11:24:17 +03:00
Nikolay Igotti
0dc9bf0104 Move to 0.4.0 2021-05-31 18:25:21 +03:00
Nikolay Igotti
e817408595 Use 0.4.0-rc2 in examples (#720) 2021-05-31 14:19:54 +03:00
Nikolay Igotti
bf4f7051a2 Move to Kotlin 1.5.10 and Compose 0.4.0-rc1 2021-05-28 14:28:15 +03:00
Nikolay Igotti
38f4cfa33e Move to 0.4.0-build209 2021-05-20 19:04:27 +03:00
Nikolay Igotti
7bdb87f20b Move to Compose 0.4.0-build208 and Kotlin 1.5.0 2021-05-20 17:48:04 +03:00
Alexey Tsvetkov
7a47ba8dd8 Support Kotlin JS targets in Compose Gradle plugin 2021-04-28 18:35:23 +03:00
Alexey Tsvetkov
8c8b4147ab Update to 0.4.0-build182 and get rid of jcenter
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
2021-04-21 12:44:57 +03:00
Nikolay Igotti
76e3f45f8b Move to Kotlin 1.4.32 and 0.4.0-build180 2021-04-12 12:26:03 +03:00
Nikolay Igotti
2f7f05babd Move to 0.3.2. 2021-03-02 09:51:30 +03:00
Nikolay Igotti
1999f58e75 Move to build 0.3.1. 2021-03-01 09:37:24 +03:00
Nikolay Igotti
10e99c20d9 Move to 0.3.0. 2021-02-22 13:19:43 +03:00
Nikolay Igotti
c58018221e Move to 0.3.0-rc1 (#410) 2021-02-21 13:26:51 +03:00
Nikolay Igotti
84163e7499 Move to 0.2.0-build132 2020-11-26 22:30:54 +03:00
Nikolay Igotti
18afa24fe0 Move to 0.2.0-build128 2020-11-23 10:08:22 +03:00
Alexey Tsvetkov
ad0b6fc916 Provide default value for Compose version for Gradle plugin
There are two versions used in the Gradle plugin:
* The version of the plugin itself;
* The version of Compose dependency used by the plugin.

On CI both versions are set to the same value specific to the build.
However, locally using 0.1.0-SNAPSHOT for the Compose version is inconvenient,
because we don't publish 0.1.0-SNAPSHOT anywhere.
Even if it existed, a moving version is not convenient for using in tests.

This commit changes version handling:
* The version of Compose is set via `compose.version` Gradle property
to the latest stable version, unless overridden by
`COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION` env. var.
* The version of the plugin is set via `deploy.version`
Gradle property to 0.1.0-SNAPSHOT,
unless overridden by `COMPOSE_GRADLE_PLUGIN_VERSION` env. var
2020-11-13 13:43:28 +03:00