You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Oleksandr Karpovich 294479d737
Add composable-test-cases project to check JB compose compiler for all targets (#2751)
2 years ago
..
.idea Copy IDEA settings from androidx project (#1455) 3 years ago
.run fix runSwing launch from README 2 years ago
buildSrc Revert #2662 2 years ago
external Remove configuration scripts (#2259) 2 years ago
frameworks Remove golden submodule (#2824) 2 years ago
integrations Add composable-test-cases project to check JB compose compiler for all targets (#2751) 2 years ago
prebuilts/androidx Update Compose 3 years ago
screenshots Compose as submodule, scripts for build/test Compose (#830) 3 years ago
scripts [components/resources] add resource("img.png"). rememberImageBitmap() (#2483) 2 years ago
.gitignore Copy IDEA settings from androidx project (#1455) 3 years ago
README.md fix runSwing launch from README 2 years ago
build.gradle.kts fix runSwing launch from README 2 years ago
gradle.properties Fix demo run, add gradle.properties with bigger memory consumption (#2293) 2 years ago
gradlew Fix CI compilation (2) (#2261) 2 years ago
gradlew.bat Fix CI compilation (2) (#2261) 2 years ago
settings.gradle.kts Add publishing infrastructure for MPP targets 3 years ago

README.md

Project in Android Studio

Composite build of Compose-jb sources

Download submodules after downloading the main project:

git submodule update --init --recursive

Set this property to always update submodules on git checkout/pull/reset:

git config --global submodule.recurse true

General requirements

  • Java 11 (should be specified in JAVA_HOME)
  • [macOs/Linux] Android SDK downloaded via ./compose/frameworks/support/jbdeps/android-sdk/downloadAndroidSdk
  • [Windows] Android SDK downloaded from Android Studio and specified in ANDROID_SDK_ROOT
  • [Optional, macOs] For AppCode IDE, specify environment variable export ANDROID_SDK_ROOT=[YOUR_PATH]/compose-jb/compose/frameworks/support/jbdeps/android-sdk/darwin (in ~/.zshrc)

Developing in IDE

  1. Download Android Studio from the official site (it is mandatory to use the version, written here). As an alternative you can use IDEA, which is compatible with this AGP version, or you can disable Android plugin in IDEA plugins, to develop non-Android targets.
  2. [macOs/Linux] Download Android SDK via ./compose/frameworks/support/jbdeps/android-sdk/downloadAndroidSdk
  3. [Windows] Download Android SDK via Android Studio and specify it in ANDROID_SDK_ROOT environment variable. Components, their versions and folder structure should be the same as in downloaded via script ./compose/frameworks/support/jbdeps/android-sdk/downloadAndroidSdk SDK for other platforms.
  4. Open compose/frameworks/support folder either in Android Studio or in IDEA or in AppCode with KMM plugin.
  5. Specify Gradle JVM to use JDK 11 in InteliJ IDEA Preferences (Build, Execution, Deployment -> Build Tools -> Gradle)

Scripts

Publish artifacts to the local directory out/androidx/build/support_repo/org/jetbrains/compose:

export COMPOSE_CUSTOM_VERSION=0.0.0-custom
./scripts/publish

(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:

./scripts/publishExtendedIcons

Run tests

Run tests for Desktop:

./scripts/testDesktop

Run tests for Web:

./scripts/testWeb

Run tests for UIKit:

./scripts/testUIKit

Run tests for Android:

./scripts/testAndroidUnit.sh
./scripts/testAndroidInEmulator.sh # first run android simulator or connect device

Run samples

Run jvm desktop sample:

./scripts/runGradle run

another jvm desktop samples:

./scripts/runGradle run1 run2 run3 runSwing runWindowApi runVsync runLayout

Run wasm sample:

./scripts/runGradle runMppJs

Run native macos sample:

./scripts/runGradle runMppMacos

Multiplatform build to mavenLocal

export COMPOSE_CUSTOM_VERSION=0.0.0-custom-version &&\
./scripts/publishToMavenLocal -Pcompose.platforms=all &&\
./scripts/publishGradlePluginToMavenLocal

-Pcompose.platforms=all could be replace with comma-separated list of platforms, such as js,jvm,androidDebug,androidRelease,macosx64,uikit.

Publish additional libraries to mavenLocal

export COMPOSE_CUSTOM_VERSION=0.0.0-custom-version &&\
./scripts/publishWebComponentsToMavenLocal &&\
./scripts/publishExtendedIconsToMavenLocal -Pcompose.platforms=all &&\
./scripts/publishComponentsToMavenLocal