Skip to content

Commit d9b4f46

Browse files
authored
Merge pull request #43 from pushpalroy/release_3.0.1
Add dashed line support for extended events
2 parents 58c0020 + a77d144 commit d9b4f46

File tree

17 files changed

+151
-59
lines changed

17 files changed

+151
-59
lines changed

.github/workflows/build.yml

+20-9
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ jobs:
1515
build:
1616
strategy:
1717
matrix:
18-
platform: [ android, ios, web, desktop ]
18+
platform: [ android, ios, web-wasm, web-js, desktop ]
1919
include:
2020
- platform: android
2121
os: ubuntu-latest
22-
- platform: web
22+
- platform: web-wasm
23+
os: ubuntu-latest
24+
- platform: web-js
2325
os: ubuntu-latest
2426
- platform: ios
2527
os: macos-latest
@@ -58,14 +60,23 @@ jobs:
5860
if: matrix.platform == 'ios'
5961
run: ./scripts/build_ios.sh
6062

61-
# Web
62-
- name: Grant execute permission for Web script
63-
if: matrix.platform == 'web'
64-
run: chmod +x ./scripts/build_web.sh
63+
# Web-WASM
64+
- name: Grant execute permission for Web WASM script
65+
if: matrix.platform == 'web-wasm'
66+
run: chmod +x ./scripts/build_web_wasm.sh
67+
68+
- name: Build Web WASM
69+
if: matrix.platform == 'web-wasm'
70+
run: ./scripts/build_web_wasm.sh
71+
72+
# Web-WASM
73+
- name: Grant execute permission for Web JS script
74+
if: matrix.platform == 'web-js'
75+
run: chmod +x ./scripts/build_web_js.sh
6576

66-
- name: Build Web
67-
if: matrix.platform == 'web'
68-
run: ./scripts/build_web.sh
77+
- name: Build Web JS
78+
if: matrix.platform == 'web-js'
79+
run: ./scripts/build_web_js.sh
6980

7081
# MacOS
7182
- name: Grant execute permission for MacOS script

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In `build.gradle` of shared module, include the following dependency
3333

3434
```gradle
3535
dependencies {
36-
implementation("io.github.pushpalroy:jetlime:3.0.0")
36+
implementation("io.github.pushpalroy:jetlime:3.0.1")
3737
}
3838
```
3939

build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ plugins {
88
alias(libs.plugins.dokka) apply false
99
alias(libs.plugins.spotless) apply false
1010
alias(libs.plugins.kotlin.cocoapods) apply false
11+
alias(libs.plugins.compose.compiler.report.generator) apply false
1112
}
1213

1314
// Compose Compiler Metrics

docs/scripts/sourceset_dependencies.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ kotlin.native.ignoreDisabledTargets=true
1212
kotlin.mpp.enableCInteropCommonization=true
1313
kotlin.mpp.androidSourceSetLayoutVersion=2
1414
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
15+
org.jetbrains.compose.experimental.jscanvas.enabled=true
1516
# Before publishing to central the library should be tested in local:
1617
# ./gradlew publishToMavenLocal. This will generate sources for our source sets
1718
# in the .m2 folder locally. Which can be tested by adding mavenLocal() under

gradle/libs.versions.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
activityCompose = "1.9.2"
33
agp = "8.5.2"
44
compose-plugin = "1.6.11"
5-
jetlime = "3.0.0"
5+
jetlime = "3.0.1"
66
junit = "4.13.2"
77
junitVersion = "1.2.1"
88
kotlin = "2.0.20-RC2"
99
kotlinxCollectionsImmutable = "0.3.7"
1010
truth = "1.3.0"
1111
vanniktech = "0.28.0"
1212
dokka = "1.9.20"
13+
report = "1.4.0"
1314
spotless = "6.25.0"
1415
androidxTest = "1.6.2"
1516

@@ -24,15 +25,16 @@ truth = { module = "com.google.truth:truth", version.ref = "truth" }
2425
kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlinxCollectionsImmutable" }
2526
jetlime = { module = "io.github.pushpalroy:jetlime", version.ref = "jetlime" }
2627
junit = { module = "junit:junit", version.ref = "junit" }
27-
dokka-android = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka"}
28+
dokka-android = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka" }
2829

2930
[plugins]
3031
android-application = { id = "com.android.application", version.ref = "agp" }
3132
android-library = { id = "com.android.library", version.ref = "agp" }
3233
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
3334
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
35+
compose-compiler-report-generator = { id = "dev.shreyaspatil.compose-compiler-report-generator", version.ref = "report" }
3436
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
3537
kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
3638
nexus-vanniktech-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech" }
37-
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka"}
38-
spotless = { id = "com.diffplug.spotless", version.ref = "spotless"}
39+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
40+
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }

jetlime/build.gradle.kts

+16-29
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import com.vanniktech.maven.publish.SonatypeHost
22
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
33
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4-
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
54

65
plugins {
76
alias(libs.plugins.android.library)
@@ -15,54 +14,43 @@ plugins {
1514

1615
kotlin {
1716
cocoapods {
17+
version = "3.0.1"
1818
summary = "JetLime KMP Library"
1919
homepage = "https://github.com/pushpalroy/JetLime"
20-
version = "3.0.0"
2120
ios.deploymentTarget = "14.0"
2221
framework {
2322
baseName = "JetLime"
2423
isStatic = true
2524
}
2625
}
2726

27+
js(IR) {
28+
browser()
29+
binaries.library()
30+
}
31+
2832
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
2933
wasmJs {
30-
moduleName = "composeApp"
3134
browser {
32-
commonWebpackConfig {
33-
outputFileName = "composeApp.js"
34-
devServer =
35-
(devServer ?: KotlinWebpackConfig.DevServer()).apply {
36-
static =
37-
(static ?: mutableListOf()).apply {
38-
// Serve sources to debug inside browser
39-
add(project.projectDir.path)
40-
}
41-
}
35+
testTask {
36+
enabled = false
4237
}
4338
}
44-
binaries.executable()
39+
binaries.library()
4540
}
4641

4742
androidTarget {
4843
@OptIn(ExperimentalKotlinGradlePluginApi::class)
4944
compilerOptions {
50-
jvmTarget.set(JvmTarget.JVM_1_8)
45+
jvmTarget.set(JvmTarget.JVM_17)
5146
}
5247
}
5348

5449
jvm("desktop")
5550

56-
listOf(
57-
iosX64(),
58-
iosArm64(),
59-
iosSimulatorArm64(),
60-
).forEach { iosTarget ->
61-
iosTarget.binaries.framework {
62-
baseName = "ComposeApp"
63-
isStatic = true
64-
}
65-
}
51+
iosX64()
52+
iosArm64()
53+
iosSimulatorArm64()
6654

6755
sourceSets {
6856
val desktopMain by getting
@@ -78,7 +66,6 @@ kotlin {
7866
implementation(compose.material3)
7967
implementation(compose.ui)
8068
implementation(compose.components.uiToolingPreview)
81-
8269
api(libs.kotlinx.collections.immutable)
8370
}
8471
desktopMain.dependencies {
@@ -116,8 +103,8 @@ android {
116103
}
117104
}
118105
compileOptions {
119-
sourceCompatibility = JavaVersion.VERSION_1_8
120-
targetCompatibility = JavaVersion.VERSION_1_8
106+
sourceCompatibility = JavaVersion.VERSION_17
107+
targetCompatibility = JavaVersion.VERSION_17
121108
}
122109
buildFeatures {
123110
compose = true
@@ -160,7 +147,7 @@ mavenPublishing {
160147
val artifactId = "jetlime"
161148

162149
// Define coordinates for the published artifact
163-
coordinates("io.github.pushpalroy", artifactId, "3.0.0")
150+
coordinates("io.github.pushpalroy", artifactId, "3.0.1")
164151

165152
// Configure POM metadata for the published artifact
166153
pom {

jetlime/jetlime.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'jetlime'
3-
spec.version = '3.0.0'
3+
spec.version = '3.0.1'
44
spec.homepage = 'https://github.com/pushpalroy/JetLime'
55
spec.source = { :http=> ''}
66
spec.authors = ''

jetlime/src/commonMain/kotlin/com/pushpal/jetlime/JetLimeExtendedEvent.kt

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ fun JetLimeExtendedEvent(
179179
start = Offset(x = timelineXOffset, y = yOffset),
180180
end = Offset(x = timelineXOffset, y = this.size.height),
181181
strokeWidth = jetLimeStyle.lineThickness.toPx(),
182+
pathEffect = jetLimeStyle.pathEffect,
182183
)
183184
}
184185

sample/composeApp/build.gradle.kts

+12-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ plugins {
99
alias(libs.plugins.jetbrains.compose)
1010
alias(libs.plugins.compose.compiler)
1111
alias(libs.plugins.kotlin.cocoapods)
12+
alias(libs.plugins.compose.compiler.report.generator)
1213
}
1314

1415
kotlin {
16+
js(IR) {
17+
browser()
18+
binaries.executable()
19+
}
20+
1521
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
1622
wasmJs {
1723
moduleName = "composeApp"
@@ -34,7 +40,7 @@ kotlin {
3440
androidTarget {
3541
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3642
compilerOptions {
37-
jvmTarget.set(JvmTarget.JVM_1_8)
43+
jvmTarget.set(JvmTarget.JVM_17)
3844
}
3945
}
4046

@@ -87,6 +93,9 @@ kotlin {
8793
desktopMain.dependencies {
8894
implementation(compose.desktop.currentOs)
8995
}
96+
jsMain.dependencies {
97+
implementation(compose.html.core)
98+
}
9099
}
91100
}
92101

@@ -148,8 +157,8 @@ android {
148157
}
149158

150159
compileOptions {
151-
sourceCompatibility = JavaVersion.VERSION_1_8
152-
targetCompatibility = JavaVersion.VERSION_1_8
160+
sourceCompatibility = JavaVersion.VERSION_17
161+
targetCompatibility = JavaVersion.VERSION_17
153162
}
154163
buildFeatures {
155164
compose = true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Pushpal Roy
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*
24+
*/
25+
import androidx.compose.ui.ExperimentalComposeUiApi
26+
import androidx.compose.ui.window.CanvasBasedWindow
27+
import org.jetbrains.skiko.wasm.onWasmReady
28+
29+
@OptIn(ExperimentalComposeUiApi::class)
30+
fun main() {
31+
onWasmReady {
32+
CanvasBasedWindow("KotlinBrowser") {
33+
App()
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>JetLime Sample</title>
6+
<script type="application/javascript" src="skiko.js"></script>
7+
<script type="application/javascript" src="composeApp.js"></script>
8+
</head>
9+
<body>
10+
<canvas id="ComposeTarget"></canvas>
11+
</body>
12+
</html>

sample/iosApp/Pods/Pods.xcodeproj/xcuserdata/pushpalroy.xcuserdatad/xcschemes/xcschememanagement.plist

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/add_git_tag.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Script to add annotated tag with version number to the main branch
44
# This script should be executed with the correct version number after every release to MavenCentral
5-
TAG="3.0.0"
5+
TAG="3.0.1"
66
COMMENT="Release $TAG"
77
BRANCH="main"
88

scripts/build_web_js.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# Exit the script on any error
4+
set -e
5+
6+
# Navigate to the root directory of the project
7+
cd "$(dirname "$0")/.." || exit
8+
9+
# Build Web JS App
10+
echo "Building Web JS App 🌎"
11+
./gradlew :sample:composeApp:jsBrowserDistribution --console=plain --stacktrace
12+
13+
# Check if the build was successful
14+
if [ $? -eq 0 ]; then
15+
echo "Web JS build successful."
16+
17+
# Create the distributions/jetlime-web folder in the root directory
18+
mkdir -p distributions/web-js
19+
20+
# Path to the production executable
21+
WEB_EXECUTABLE_PATH="sample/composeApp/build/dist/js/productionExecutable/"
22+
23+
# Verify and copy the production executable to the distributions folder
24+
if [ -d "$WEB_EXECUTABLE_PATH" ]; then
25+
cp -r "$WEB_EXECUTABLE_PATH" distributions/web-js/
26+
echo "Web JS app copied to distributions/web-js"
27+
else
28+
echo "Web JS build output not found at expected path: $WEB_EXECUTABLE_PATH"
29+
exit 1
30+
fi
31+
else
32+
echo "Web JS build failed."
33+
exit 1
34+
fi

0 commit comments

Comments
 (0)