Browse Source

describe scripts to run tests and samples (#2089)

on_kotlin_1.7.0-rc
dima-avdeev-jb 2 years ago committed by GitHub
parent
commit
d550f2763f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      compose/README.md
  2. 22
      compose/build.gradle.kts

40
compose/README.md

@ -3,11 +3,11 @@
Composite build of [Compose-jb sources](https://github.com/JetBrains/androidx)
## Download submodules after downloading the main project:
```
```bash
git submodule update --init --recursive
```
Set this property to always update submodules on git checkout/pull/reset:
```
```bash
git config --global submodule.recurse true
```
@ -50,20 +50,50 @@ export COMPOSE_CUSTOM_VERSION=0.0.0-custom
(on Windows it doesn't build at the moment, the issue is in the line `packageInspector(project, project(":compose:ui:ui-inspection")` in `compose/frameworks/support/compose/ui/ui/build.gradle`)
Publish extended icons:
```
```bash
./scripts/publishExtendedIcons
```
### Run tests
Run tests for Desktop:
```
```bash
./scripts/testDesktop
```
Run tests for Web:
```
```bash
./scripts/testWeb
```
Run tests for Android:
```bash
./scripts/testAndroidUnit.sh
```
```bash
./scripts/testAndroidInEmulator.sh # first run android simulator or connect device
```
### Run samples
Run jvm desktop sample:
```bash
./scripts/runGradle run
```
another jvm desktop samples:
```bash
./scripts/runGradle run1 run2 run3 run4 runWindowApi runVsync
```
Run wasm sample:
```bash
./scripts/runGradle runMppJs
```
Run native macos sample:
```bash
./scripts/runGradle runMppMacos
```
## Multiplatform build
```console

22
compose/build.gradle.kts

@ -156,6 +156,28 @@ tasks.register("run") {
dependsOnComposeTask(":compose:desktop:desktop:desktop-samples:run")
}
for (i in 1..4) {
tasks.register("run$i") {
dependsOnComposeTask(":compose:desktop:desktop:desktop-samples:run$i")
}
}
tasks.register("runWindowApi") {
dependsOnComposeTask(":compose:desktop:desktop:desktop-samples:runWindowApi")
}
tasks.register("runVsync") {
dependsOnComposeTask(":compose:desktop:desktop:desktop-samples:runVsync")
}
tasks.register("runMppJs") {
dependsOnComposeTask(":compose:mpp:demo:jsRun")
}
tasks.register("runMppMacos") {
dependsOnComposeTask(":compose:mpp:demo:runDebugExecutableMacosX64")
}
val mavenCentral = MavenCentralProperties(project)
if (mavenCentral.signArtifacts) {
signing.useInMemoryPgpKeys(

Loading…
Cancel
Save