Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ios//wasm targets #77

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 42 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android Jetpack Compose Color Picker 🎨

![Maven Central](https://img.shields.io/maven-central/v/com.godaddy.android.colorpicker/compose-color-picker-android?style=flat-square)
![Maven Central](https://img.shields.io/maven-central/v/com.godaddy.colorpicker/compose-color-picker-android?style=flat-square)

A component that provides two different HSV color pickers, written in Jetpack Compose.
1. ClassicColorPicker - Square picker with alpha channel
Expand All @@ -17,18 +17,18 @@ https://user-images.githubusercontent.com/9973046/154515203-f0818a14-3bb0-4e5a-9
Add the dependency to your `build.gradle` file:

```
implementation 'com.godaddy.android.colorpicker:compose-color-picker:<latest-version>'
implementation 'com.godaddy.colorpicker:compose-color-picker:<latest-version>'

// with Android ColorInt extensions
implementation 'com.godaddy.android.colorpicker:compose-color-picker-android:<latest-version>'
implementation 'com.godaddy.colorpicker:compose-color-picker-android:<latest-version>'
// desktop jvm version
implementation 'com.godaddy.android.colorpicker:compose-color-picker-jvm:<latest-version>'
implementation 'com.godaddy.colorpicker:compose-color-picker-jvm:<latest-version>'
```

Add `ClassicColorPicker` to your Compose hierarchy:

```kotlin
import com.godaddy.android.colorpicker.HsvColor
import com.godaddy.colorpicker.HsvColor

Column {
ClassicColorPicker(
Expand Down Expand Up @@ -63,7 +63,7 @@ If you wish to not display other magnifiers - set `ColorHarmonyMode.NONE` as you
To change the size of the control, pass in the `Modifier` option:

```kotlin
import com.godaddy.android.colorpicker.HsvColor
import com.godaddy.colorpicker.HsvColor

ClassicColorPicker(
modifier = Modifier.height(200.dp),
Expand All @@ -78,7 +78,7 @@ ClassicColorPicker(
To hide the alpha bar, change the `showAlphaBar` parameter:

```kotlin
import com.godaddy.android.colorpicker.HsvColor
import com.godaddy.colorpicker.HsvColor

ClassicColorPicker(
showAlphaBar = false,
Expand Down Expand Up @@ -110,7 +110,7 @@ HarmonyColorPicker(
To change the size of the control, pass in the `Modifier` option:

```kotlin
import com.godaddy.android.colorpicker.HsvColor
import com.godaddy.colorpicker.HsvColor

HarmonyColorPicker(
modifier = Modifier.height(200.dp),
Expand All @@ -119,6 +119,40 @@ HarmonyColorPicker(
}
)
```
# Compose Multiplatform Application

## Before running!
- check your system with [KDoctor](https://github.com/Kotlin/kdoctor)
- install JDK 17 or higher on your machine
- add `local.properties` file to the project root and set a path to Android SDK there

### Android
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration

To build the application bundle:
- run `./gradlew :composeApp:assembleDebug`
- find `.apk` file in `composeApp/build/outputs/apk/debug/composeApp-debug.apk`
Run android simulator UI tests: `./gradlew :composeApp:pixel5Check`

### Desktop
Run the desktop application: `./gradlew :composeApp:run`
Run desktop UI tests: `./gradlew :composeApp:jvmTest`

### iOS
To run the application on iPhone device/simulator:
- Open `iosApp/iosApp.xcproject` in Xcode and run standard configuration
- Or use [Kotlin Multiplatform Mobile plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile) for Android Studio
Run iOS simulator UI tests: `./gradlew :composeApp:iosSimulatorArm64Test`

### Experimental Browser (JS)
Run the browser application: `./gradlew :composeApp:jsBrowserDevelopmentRun --continue`
Run browser UI tests: `./gradlew :composeApp:jsBrowserTest`

### Experimental Browser (Wasm)
Run the browser application: `./gradlew :composeApp:wasmJsBrowserDevelopmentRun --continue`
Run browser UI tests: `./gradlew :composeApp:wasmJsBrowserTest`
```

# Library Contribution Information

Expand Down
1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

43 changes: 0 additions & 43 deletions app/build.gradle.kts

This file was deleted.

21 changes: 0 additions & 21 deletions app/proguard-rules.pro

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/main/AndroidManifest.xml

This file was deleted.

7 changes: 0 additions & 7 deletions app/src/main/java/com/godaddy/android/colorpicker/Route.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading