Browse Source

describe scripts to run tests and samples (#2089)

on_kotlin_1.7.0-rc
dima-avdeev-jb 3 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) Composite build of [Compose-jb sources](https://github.com/JetBrains/androidx)
## Download submodules after downloading the main project: ## Download submodules after downloading the main project:
``` ```bash
git submodule update --init --recursive git submodule update --init --recursive
``` ```
Set this property to always update submodules on git checkout/pull/reset: Set this property to always update submodules on git checkout/pull/reset:
``` ```bash
git config --global submodule.recurse true 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`) (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: Publish extended icons:
``` ```bash
./scripts/publishExtendedIcons ./scripts/publishExtendedIcons
``` ```
### Run tests
Run tests for Desktop: Run tests for Desktop:
``` ```bash
./scripts/testDesktop ./scripts/testDesktop
``` ```
Run tests for Web: Run tests for Web:
``` ```bash
./scripts/testWeb ./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 ## Multiplatform build
```console ```console

22
compose/build.gradle.kts

@ -156,6 +156,28 @@ tasks.register("run") {
dependsOnComposeTask(":compose:desktop:desktop:desktop-samples: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) val mavenCentral = MavenCentralProperties(project)
if (mavenCentral.signArtifacts) { if (mavenCentral.signArtifacts) {
signing.useInMemoryPgpKeys( signing.useInMemoryPgpKeys(

Loading…
Cancel
Save