Skip to content

Commit

Permalink
Merge pull request #620 from aashay-gaikwad/compose-1.5
Browse files Browse the repository at this point in the history
Upgrade to Compose 1.5 and Kotlin 1.9
  • Loading branch information
aashay-gaikwad authored Oct 19, 2023
2 parents 595f6a1 + f43c145 commit df8a5c8
Show file tree
Hide file tree
Showing 71 changed files with 399 additions and 358 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: instrumentation-failures
path: |
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
- name: Upload failed screenshot artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: screenshot-failures
path: |
Expand All @@ -162,7 +162,7 @@ jobs:
check-documentation:
name: Check documentation
runs-on: ubuntu-latest
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Changed

- [#611](https://github.com/bumble-tech/appyx/pull/611) – Lower position and rotation animation default round-off thresholds
- [#620](https://github.com/bumble-tech/appyx/pull/620) – Updated Compose to 1.5.3 & Kotlin to 1.9.10

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
4 changes: 2 additions & 2 deletions appyx-components/experimental/modal/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}

Expand Down Expand Up @@ -43,7 +43,7 @@ kotlin {
implementation(kotlin("test"))
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.key.Key
Expand All @@ -44,7 +43,6 @@ import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup
import com.bumble.appyx.interactions.sample.Children

@Suppress("MagicNumber", "LongMethod")
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun Puzzle15Ui(
screenWidthPx: Int,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.bumble.appyx.components.internal.testdrive.android

import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
Expand Down Expand Up @@ -103,9 +102,6 @@ class KeyframesTest {
composeTestRule.snapshot("${javaClass.simpleName}_${nameRule.methodName}")
}

@OptIn(
ExperimentalMaterialApi::class
)
@Test
@Ignore("This test attempts to find flickers and artifacts that were fixed in the past. However the artifacts do not show up when running this test")
fun validate_that_no_artefacts_appear_during_animation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
2 changes: 1 addition & 1 deletion appyx-components/stable/backstack/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
4 changes: 2 additions & 2 deletions appyx-components/stable/spotlight/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down Expand Up @@ -44,7 +44,7 @@ kotlin {
implementation(kotlin("test"))
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
2 changes: 1 addition & 1 deletion appyx-interactions/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
api(libs.compose.material3)

api(project(":appyx-interactions:appyx-interactions"))
api(libs.compose.ui.test.junit4)
api(libs.compose.ui.test.junit4.android)
implementation(libs.androidx.test.core)
implementation(composeBom)

Expand Down
4 changes: 2 additions & 2 deletions appyx-interactions/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down Expand Up @@ -51,7 +51,7 @@ kotlin {
api(libs.androidx.core)
}
}
val androidTest by getting {
val androidUnitTest by getting {
dependencies {
implementation(libs.junit)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.bumble.appyx.interactions.core.modifiers

import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.input.pointer.PointerEventPass
Expand All @@ -9,7 +8,6 @@ import androidx.compose.ui.node.PointerInputModifierNode
import androidx.compose.ui.platform.InspectorInfo
import androidx.compose.ui.unit.IntSize

@OptIn(ExperimentalComposeUiApi::class)
class OnPointerEventNode(var callback: (PointerEvent) -> Unit) :
PointerInputModifierNode, Modifier.Node() {
override fun onPointerEvent(
Expand All @@ -29,14 +27,12 @@ class OnPointerEventNode(var callback: (PointerEvent) -> Unit) :
}
}

@OptIn(ExperimentalComposeUiApi::class)
data class PointerInputElement(
val callback: (PointerEvent) -> Unit
) : ModifierNodeElement<OnPointerEventNode>() {
override fun create() = OnPointerEventNode(callback)
override fun update(node: OnPointerEventNode): OnPointerEventNode {
override fun update(node: OnPointerEventNode) {
node.callback = callback
return node
}

override fun InspectorInfo.inspectableProperties() {
Expand Down
2 changes: 1 addition & 1 deletion appyx-navigation/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ import com.bumble.appyx.navigation.platform.OnBackPressedDispatcherOwner
import com.bumble.appyx.navigation.platform.PlatformLifecycleRegistry
import com.bumble.appyx.utils.customisations.NodeCustomisationDirectory
import com.bumble.appyx.utils.customisations.NodeCustomisationDirectoryImpl
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.useContents
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.launch
import platform.UIKit.UIScreen

@OptIn(ExperimentalForeignApi::class)
@Suppress("ComposableParamOrder") // detekt complains as 'factory' param isn't a pure lambda
@Composable
fun <N : Node> IosNodeHost(
Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ dependencyAnalysis {
":utils:testing-ui-activity",

// Convenience for convention plugins to avoid needing to define this.
"org.junit.jupiter:junit-jupiter-api"
"org.junit.jupiter:junit-jupiter-api",

// This is used in:demos:appyx-interactions:android. But raised as unused.
"androidx.compose.material:material-icons-extended",
)
}
}
Expand Down
3 changes: 1 addition & 2 deletions demos/appyx-interactions/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.androidx.lifecycle.java8)
implementation(libs.compose.ui.tooling)
implementation(libs.compose.ui.ui)

implementation(libs.compose.material.icons.extended)

implementation(libs.google.material)
implementation(libs.compose.material3)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.BiasAlignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
Expand Down Expand Up @@ -119,7 +118,6 @@ private fun FrameWindowScope.TitleBar(
}
}

@OptIn(ExperimentalComposeUiApi::class)
private fun onKeyEvent(
keyEvent: KeyEvent,
events: Channel<Events>,
Expand Down
2 changes: 2 additions & 0 deletions demos/appyx-interactions/ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ kotlin {
baseName = "ios"
isStatic = true
}
license = "Apache License, Version 2.0"
authors = "https://github.com/bumble-tech/"
}

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions demos/appyx-interactions/ios/ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Pod::Spec.new do |spec|
spec.version = '1.0.0'
spec.homepage = 'https://bumble-tech.github.io/appyx/interactions/'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.authors = 'https://github.com/bumble-tech/'
spec.license = 'Apache License, Version 2.0'
spec.summary = 'appyx-interactions ios module'
spec.vendored_frameworks = 'build/cocoapods/framework/ios.framework'
spec.libraries = 'c++'
Expand Down Expand Up @@ -35,5 +35,5 @@ Pod::Spec.new do |spec|
SCRIPT
}
]
spec.resources = ['build/compose/ios/ios/compose-resources']
end
2 changes: 1 addition & 1 deletion demos/appyx-interactions/iosApp/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../ios"

SPEC CHECKSUMS:
ios: 8191875220b69f28f1312f76f27ebe46e596c7d1
ios: 757453dfdab442b1775d1835e10749060783e38d

PODFILE CHECKSUM: a1e557981a2880940a401c85ea35aafdd5895941

Expand Down
18 changes: 18 additions & 0 deletions demos/appyx-interactions/iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
7555FF77242A565900829871 /* Sources */,
7555FF79242A565900829871 /* Resources */,
F85CB1118929364A9C6EFABC /* Frameworks */,
DC181123632E88DCC8F3A89D /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -192,6 +193,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
DC181123632E88DCC8F3A89D /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
1 change: 0 additions & 1 deletion demos/appyx-navigation/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ dependencies {
implementation(libs.coil.compose)
implementation(libs.compose.material3)
implementation(libs.compose.ui.tooling)
implementation(libs.compose.ui.ui)
implementation(libs.google.material)
}
2 changes: 1 addition & 1 deletion demos/appyx-navigation/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appyx {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm("desktop") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package com.bumble.appyx.navigation
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.remember
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.KeyEvent
import androidx.compose.ui.input.key.KeyEventType
Expand Down Expand Up @@ -57,7 +56,6 @@ fun main() = application {
}
}

@OptIn(ExperimentalComposeUiApi::class)
private fun onKeyEvent(
keyEvent: KeyEvent,
events: Channel<Events>,
Expand Down
2 changes: 2 additions & 0 deletions demos/appyx-navigation/ios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ kotlin {
baseName = "ios"
isStatic = true
}
license = "Apache License, Version 2.0"
authors = "https://github.com/bumble-tech/"
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion demos/appyx-navigation/ios/ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Pod::Spec.new do |spec|
SCRIPT
}
]
spec.resources = ['build/compose/ios/ios/compose-resources']
end
Loading

0 comments on commit df8a5c8

Please sign in to comment.