diff --git a/.github/workflows/check-api.yml b/.github/workflows/check-api.yml index 4bf9a25..84c948c 100644 --- a/.github/workflows/check-api.yml +++ b/.github/workflows/check-api.yml @@ -16,6 +16,6 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" # OR adopt OR microsoft OR... - java-version: "17" + java-version: "21" - name: Run the check run: ./gradlew apiCheck diff --git a/.github/workflows/generate-publication.yml b/.github/workflows/generate-publication.yml index 4576926..c9f7078 100644 --- a/.github/workflows/generate-publication.yml +++ b/.github/workflows/generate-publication.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" # OR adopt OR microsoft OR... - java-version: "17" + java-version: "21" - name: Decode the private GPG key file stored in GitHub secrets run: echo $SIGNING_KEY_CONTENT_BASE64 | base64 -d > private-key.gpg - name: Generate publication diff --git a/.github/workflows/release-new-version.yml b/.github/workflows/release-new-version.yml index c745c75..ec9222e 100644 --- a/.github/workflows/release-new-version.yml +++ b/.github/workflows/release-new-version.yml @@ -29,7 +29,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" # OR adopt OR microsoft OR... - java-version: "17" + java-version: "21" - name: Decode the private GPG key file stored in GitHub secrets run: echo $SIGNING_KEY_CONTENT_BASE64 | base64 -d > private-key.gpg - name: Release to local repository diff --git a/.gitignore b/.gitignore index 1a03b4c..8e2790d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties /.idea .DS_Store +.kotlin/ build/ /captures .externalNativeBuild diff --git a/README.md b/README.md index c5d3d4a..acb0505 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,9 @@ implementation("ir.mahozad.multiplatform:comshot:0.1.0") - https://developer.android.com/studio/preview/compose-screenshot-testing - https://developer.android.com/reference/androidx/test/espresso/screenshot/ViewInteractionCapture -[Kotlin version]: https://img.shields.io/badge/Kotlin-1.9.22-303030.svg?labelColor=303030&logo=data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxOC45MyAxOC45MiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIHI9IjIxLjY3OSIgY3g9IjIyLjQzMiIgY3k9IjMuNDkzIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTQuMTMgLTIuNzE4KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgPHN0b3Agc3RvcC1jb2xvcj0iI2U0NDg1NyIgb2Zmc2V0PSIuMDAzIi8+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjYzcxMWUxIiBvZmZzZXQ9Ii40NjkiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiM3ZjUyZmYiIG9mZnNldD0iMSIvPgogIDwvcmFkaWFsR3JhZGllbnQ+CiAgPHBhdGggZmlsbD0idXJsKCNncmFkaWVudCkiIGQ9Ik0gMTguOTMsMTguOTIgSCAwIFYgMCBIIDE4LjkzIEwgOS4yNyw5LjMyIFoiLz4KPC9zdmc+Cg== -[Compose Multiplatform version]: https://img.shields.io/badge/Compose_Multiplatform-1.6.0_beta02-303030.svg?labelColor=303030&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAj5JREFUOI2Vk0FIVFEUhv9znBllplBIF7loK1jtJKhFNG/EVtYicNkmKghCMpJGq0HoPcWQVi2KUMqdixaJi0KdXVBILQojs4wCaTGC4LyX+N47fwtFpnEKOnDh3p//fudeDr+QRK3KukGHCscAwCjXi4PphVo+qQZkhzaa61J6m8RhAfpisS01HQOwZin0F29kftYEdDxCsqnkX6HgIonR+YHM00pjzg26oXRBPrNw30ixgM1dgDMcnFFyyIAphpn7xQI2Tw6XW5LQO0L+isPQKxaa1rNDaJCkf02BHhMpzOfTzxUA1GyCxEcFxjcOIu50/b4kZQnkZQJ9mkwuOV5wqaUdYSIhTwBZFto4AOj2R+S7qEwZMNtU8lcoGAPximZHDegAsCjgw7XP/rJFnDHBhEB+AABIIueW35FEdsQ/67hl5jz/AklUrpxX7nfcMp27wYnKO/rHCAwhANDkffW4DPJhZxtV6lpt/N+qCRCND+3RDHs0AEhUHii6KIxXSZnq9PxJTUhetrQ+VrsH4TlAvlgUfd3zAgMau0aD1uLNhm8WBm0CjBDoiSN8ijReJHBaRAYtTB8pFvaXukaDVgMadwFC6bWIM47n54GWaHYgM5CwunaASwBe1yXQNptPewDgeH7eIs4IpXcXMDeYnl5vzhxTINCUv+B4/vkXtxpWQEwK8Phlf3o15wbdmvLfCFgfh5njc4Pp6e3mVWHqHN44AOidnTC9NVpJRE+BKP0zTNW1HWc8IMxIvfq3OP8GvjkzgYHHZZMAAAAASUVORK5CYII= +[Kotlin version]: https://img.shields.io/badge/Kotlin-2.0.0-303030.svg?labelColor=303030&logo=data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxOC45MyAxOC45MiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIHI9IjIxLjY3OSIgY3g9IjIyLjQzMiIgY3k9IjMuNDkzIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTQuMTMgLTIuNzE4KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgPHN0b3Agc3RvcC1jb2xvcj0iI2U0NDg1NyIgb2Zmc2V0PSIuMDAzIi8+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjYzcxMWUxIiBvZmZzZXQ9Ii40NjkiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiM3ZjUyZmYiIG9mZnNldD0iMSIvPgogIDwvcmFkaWFsR3JhZGllbnQ+CiAgPHBhdGggZmlsbD0idXJsKCNncmFkaWVudCkiIGQ9Ik0gMTguOTMsMTguOTIgSCAwIFYgMCBIIDE4LjkzIEwgOS4yNyw5LjMyIFoiLz4KPC9zdmc+Cg== +[Compose Multiplatform version]: https://img.shields.io/badge/Compose_Multiplatform-1.6.11-303030.svg?labelColor=303030&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAj5JREFUOI2Vk0FIVFEUhv9znBllplBIF7loK1jtJKhFNG/EVtYicNkmKghCMpJGq0HoPcWQVi2KUMqdixaJi0KdXVBILQojs4wCaTGC4LyX+N47fwtFpnEKOnDh3p//fudeDr+QRK3KukGHCscAwCjXi4PphVo+qQZkhzaa61J6m8RhAfpisS01HQOwZin0F29kftYEdDxCsqnkX6HgIonR+YHM00pjzg26oXRBPrNw30ixgM1dgDMcnFFyyIAphpn7xQI2Tw6XW5LQO0L+isPQKxaa1rNDaJCkf02BHhMpzOfTzxUA1GyCxEcFxjcOIu50/b4kZQnkZQJ9mkwuOV5wqaUdYSIhTwBZFto4AOj2R+S7qEwZMNtU8lcoGAPximZHDegAsCjgw7XP/rJFnDHBhEB+AABIIueW35FEdsQ/67hl5jz/AklUrpxX7nfcMp27wYnKO/rHCAwhANDkffW4DPJhZxtV6lpt/N+qCRCND+3RDHs0AEhUHii6KIxXSZnq9PxJTUhetrQ+VrsH4TlAvlgUfd3zAgMau0aD1uLNhm8WBm0CjBDoiSN8ijReJHBaRAYtTB8pFvaXukaDVgMadwFC6bWIM47n54GWaHYgM5CwunaASwBe1yXQNptPewDgeH7eIs4IpXcXMDeYnl5vzhxTINCUv+B4/vkXtxpWQEwK8Phlf3o15wbdmvLfCFgfh5njc4Pp6e3mVWHqHN44AOidnTC9NVpJRE+BKP0zTNW1HWc8IMxIvfq3OP8GvjkzgYHHZZMAAAAASUVORK5CYII= [Latest Maven Central release]: https://img.shields.io/maven-central/v/ir.mahozad.multiplatform/comshot?label=Maven%20Central&labelColor=303030&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE2IDE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHN0eWxlPi5he2ZpbGw6bm9uZTt9LmJ7Y2xpcC1wYXRoOnVybCgjYSk7fS5je2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgIDxyZWN0IGNsYXNzPSJhIiB4PSIxNC43IiB5PSIxMSIgd2lkdGg9IjE3MSIgaGVpZ2h0PSIxNTEiLz4KICAgIDwvY2xpcFBhdGg+CiAgICA8Y2xpcFBhdGggaWQ9ImNsaXBQYXRoMTMiPgogICAgICA8cmVjdCBjbGFzcz0iYSIgeD0iMTQuNyIgeT0iMTEiIHdpZHRoPSIxNzEiIGhlaWdodD0iMTUxIi8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KICA8cGF0aCBjbGFzcz0iYyIgdHJhbnNmb3JtPSJtYXRyaXgoLjE2NCAwIDAgLjE2NCAtOC4zNyAtMS44MSkiIGQ9Im0xMDAgMTEtNDIuMyAyNC40djQ4LjlsNDIuMyAyNC40IDQyLjMtMjQuNHYtNDguOXptMzAuMiA2Ni4zLTMwLjIgMTcuNC0zMC4yLTE3LjR2LTM0LjlsMzAuMi0xNy40IDMwLjIgMTcuNHoiIGNsaXAtcGF0aD0idXJsKCNjbGlwUGF0aDEzKSIvPgo8L3N2Zz4K -[Kotlin release]: https://github.com/JetBrains/kotlin/releases/tag/v1.9.22 -[Compose Multiplatform release]: https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.6.0-beta02 +[Kotlin release]: https://github.com/JetBrains/kotlin/releases/tag/v2.0.0 +[Compose Multiplatform release]: https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.6.11 [Library on Maven Central]: https://repo1.maven.org/maven2/ir/mahozad/multiplatform/comshot/0.1.0/ diff --git a/build.gradle.kts b/build.gradle.kts index 6da9a60..8bf3660 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.compose.multiplatform) apply false alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.kotlin.compatibility) apply false + alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false alias(libs.plugins.dokka) apply false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b6a09fa..2671a24 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,22 +1,22 @@ [versions] -gradle = "8.6" -java = "17" -kotlin = "1.9.22" +gradle = "8.8" +java = "21" +kotlin = "2.0.0" kotlin-compatibility = "0.14.0" -compose-multiplatform = "1.6.0-beta02" -agp = "8.2.2" # Android Gradle plugin +compose-multiplatform = "1.6.11" +agp = "8.3.2" # Android Gradle plugin android-minSdk = "21" android-compileSdk = "34" android-targetSdk = "34" -androidx-activityCompose = "1.8.2" -androidx-core = "1.12.0" -androidx-appcompat = "1.6.1" -androidx-compose-ui = "1.6.1" -androidx-lifecycle = "2.7.0" -androidx-test-core = "1.5.0" -androidx-test-junit = "1.1.5" -skiko = "0.7.92" -dokka = "1.9.10" +androidx-activityCompose = "1.9.0" +androidx-core = "1.13.1" +androidx-appcompat = "1.7.0" +androidx-compose-ui = "1.6.8" +androidx-lifecycle = "2.8.3" +androidx-test-core = "1.6.1" +androidx-test-junit = "1.2.1" +skiko = "0.8.9" +dokka = "1.9.20" junit4 = "4.13.2" [libraries] @@ -37,6 +37,7 @@ junit4 = { group = "junit", name = "junit", version.ref = "junit4" } compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-compatibility" } +kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 13b6e5b..bc830d0 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -8,6 +8,7 @@ import java.util.* plugins { alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.kotlin.compatibility) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.library) alias(libs.plugins.dokka) diff --git a/showcase/androidApp/build.gradle.kts b/showcase/androidApp/build.gradle.kts index 58fd251..7b6730f 100644 --- a/showcase/androidApp/build.gradle.kts +++ b/showcase/androidApp/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.application) } diff --git a/showcase/desktopApp/build.gradle.kts b/showcase/desktopApp/build.gradle.kts index 9b4d57c..2e1ad43 100644 --- a/showcase/desktopApp/build.gradle.kts +++ b/showcase/desktopApp/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) } diff --git a/showcase/jsApp/build.gradle.kts b/showcase/jsApp/build.gradle.kts index 1c594a1..5c02661 100644 --- a/showcase/jsApp/build.gradle.kts +++ b/showcase/jsApp/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) } diff --git a/showcase/shared/build.gradle.kts b/showcase/shared/build.gradle.kts index 847f83a..0449d7a 100644 --- a/showcase/shared/build.gradle.kts +++ b/showcase/shared/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.library) // kotlin("native.cocoapods") diff --git a/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt b/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt index d4e9cb3..8b67aca 100644 --- a/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt +++ b/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt @@ -20,6 +20,7 @@ import org.jetbrains.compose.resources.painterResource import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.measureTimedValue +import comshot.showcase.shared.generated.resources.Photo_by_Lucas_Chizzali_on_Unsplash @OptIn(ExperimentalResourceApi::class) @Composable @@ -41,7 +42,7 @@ fun Activity.MainView() { Text(text = "!".repeat(padding)) Column(horizontalAlignment = Alignment.CenterHorizontally) { Image( - painter = painterResource(Res.drawable.photo_by_lucas_chizzali_on_unsplash), + painter = painterResource(Res.drawable.Photo_by_Lucas_Chizzali_on_Unsplash), modifier = Modifier.size(200.dp), contentDescription = null ) diff --git a/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt b/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt index 0c72898..2a00c1c 100644 --- a/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt +++ b/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt @@ -19,6 +19,7 @@ import org.jetbrains.compose.resources.painterResource import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.measureTimedValue +import comshot.showcase.shared.generated.resources.Photo_by_Lucas_Chizzali_on_Unsplash @OptIn(ExperimentalResourceApi::class) @Composable @@ -40,7 +41,7 @@ fun App() { Text(text = "!".repeat(padding)) Column(horizontalAlignment = Alignment.CenterHorizontally) { Image( - painter = painterResource(Res.drawable.photo_by_lucas_chizzali_on_unsplash), + painter = painterResource(Res.drawable.Photo_by_Lucas_Chizzali_on_Unsplash), modifier = Modifier.size(200.dp), contentDescription = null ) diff --git a/showcase/wasmJsApp/build.gradle.kts b/showcase/wasmJsApp/build.gradle.kts index 4b9d0f8..fa393bb 100644 --- a/showcase/wasmJsApp/build.gradle.kts +++ b/showcase/wasmJsApp/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) }