Skip to content

Commit

Permalink
feat: bump iOS and Android dependencies to support elastic easing and…
Browse files Browse the repository at this point in the history
… nested inputs
  • Loading branch information
zplata committed Nov 17, 2023
1 parent 0e4b65a commit 7d3aa9f
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 20 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ dependencies {
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1'
implementation 'app.rive:rive-android:8.4.0'
implementation 'app.rive:rive-android:8.7.0'
implementation "androidx.startup:startup-runtime:1.1.1"
implementation 'com.android.volley:volley:1.2.0'
}
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RiveReactNative_kotlinVersion=1.8.10
RiveReactNative_compileSdkVersion=33
RiveReactNative_compileSdkVersion=34
RiveReactNative_buildToolsVersion=30.0.3
RiveReactNative_targetSdkVersion=33
RiveReactNative_targetSdkVersion=34
14 changes: 7 additions & 7 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ import com.android.build.OutputFile
* ]
*/

project.ext.react = [
enableHermes: true, // clean and rebuild if changing
entryFile: "index.tsx",
]
//project.ext.react = [
// enableHermes: true, // clean and rebuild if changing
// entryFile: "index.tsx",
//]

apply plugin: "com.facebook.react"

Expand Down Expand Up @@ -115,17 +115,17 @@ react {
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
entryFile = file("..index.tsx")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
hermesFlags = ["-O", "-output-source-map"]
}
/**
* Run Proguard to shrink the Java bytecode in release builds.
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

buildscript {
ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
compileSdkVersion = 34
targetSdkVersion = 34
kotlinVersion = "1.8.10"

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
Expand Down
4 changes: 4 additions & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ android.useAndroidX=true
android.enableJetifier=true
FLIPPER_VERSION=0.182.0
org.gradle.jvmargs=-Xmx4608m
# org.gradle.jvmargs=-Xmx4g
# org.gradle.daemon=true
# org.gradle.parallel=true
# org.gradle.configureondemand=true

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
Expand Down
Binary file added example/ios/Assets/nested_menu.riv
Binary file not shown.
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ PODS:
- React-jsi (= 0.72.3)
- React-logger (= 0.72.3)
- React-perflogger (= 0.72.3)
- rive-react-native (6.0.4):
- rive-react-native (6.1.1):
- React-Core
- RiveRuntime (= 5.3.1)
- RiveRuntime (5.3.1)
- RiveRuntime (= 5.5.1)
- RiveRuntime (5.5.1)
- RNCMaskedView (0.2.9):
- React-Core
- RNCPicker (1.16.8):
Expand Down Expand Up @@ -744,8 +744,8 @@ SPEC CHECKSUMS:
React-runtimescheduler: 837c1bebd2f84572db17698cd702ceaf585b0d9a
React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3
ReactCommon: 3ccb8fb14e6b3277e38c73b0ff5e4a1b8db017a9
rive-react-native: a932751960b201581fd0dd91371ac400991e6201
RiveRuntime: 63fe0407ab96ab1796c492d1e584a3b766e80693
rive-react-native: 112e318d564488e79cef71ed192f13b5768e196b
RiveRuntime: b57830ff73f406f3b4022f457b16690535ca4d05
RNCMaskedView: 949696f25ec596bfc697fc88e6f95cf0c79669b6
RNCPicker: 0991c56da7815c0cf946d6f63cf920b25296e5f6
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
Expand Down
4 changes: 4 additions & 0 deletions example/ios/RiveReactNativeExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
C3C07472283BE07300E8EB33 /* hero_editor.riv in Resources */ = {isa = PBXBuildFile; fileRef = C3C07471283BE07300E8EB33 /* hero_editor.riv */; };
E554409B2A79DC8100D550DE /* hello_world_text.riv in Resources */ = {isa = PBXBuildFile; fileRef = E554409A2A79DC8100D550DE /* hello_world_text.riv */; };
E5637D7A292BD27F000CBC1E /* skills_listener.riv in Resources */ = {isa = PBXBuildFile; fileRef = E5637D79292BD26D000CBC1E /* skills_listener.riv */; };
E59C19102B07F6FE002F0CBA /* nested_menu.riv in Resources */ = {isa = PBXBuildFile; fileRef = E59C190F2B07F6FE002F0CBA /* nested_menu.riv */; };
E5A17A90299AA0F5008CC433 /* avatars.riv in Resources */ = {isa = PBXBuildFile; fileRef = E5A17A8F299AA0F5008CC433 /* avatars.riv */; };
E5F3FC4029B2661500D6D265 /* switch.riv in Resources */ = {isa = PBXBuildFile; fileRef = E5F3FC3F29B2661500D6D265 /* switch.riv */; };
E5FC4EAA2ABB975100D98158 /* rating.riv in Resources */ = {isa = PBXBuildFile; fileRef = E5FC4EA92ABB975100D98158 /* rating.riv */; };
Expand Down Expand Up @@ -94,6 +95,7 @@
E00ACF0FDA8BF921659E2F9A /* Pods-RiveReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiveReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-RiveReactNativeExample/Pods-RiveReactNativeExample.release.xcconfig"; sourceTree = "<group>"; };
E554409A2A79DC8100D550DE /* hello_world_text.riv */ = {isa = PBXFileReference; lastKnownFileType = file; name = hello_world_text.riv; path = ../../android/app/src/main/res/raw/hello_world_text.riv; sourceTree = "<group>"; };
E5637D79292BD26D000CBC1E /* skills_listener.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = skills_listener.riv; sourceTree = "<group>"; };
E59C190F2B07F6FE002F0CBA /* nested_menu.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = nested_menu.riv; sourceTree = "<group>"; };
E5A17A8F299AA0F5008CC433 /* avatars.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = avatars.riv; sourceTree = "<group>"; };
E5F3FC3F29B2661500D6D265 /* switch.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = switch.riv; sourceTree = "<group>"; };
E5FC4EA92ABB975100D98158 /* rating.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = rating.riv; sourceTree = "<group>"; };
Expand Down Expand Up @@ -254,6 +256,7 @@
9D879D0C265BF2A400D01424 /* ui_swipe_left_to_delete.riv */,
E5FC4EA92ABB975100D98158 /* rating.riv */,
E5A17A8F299AA0F5008CC433 /* avatars.riv */,
E59C190F2B07F6FE002F0CBA /* nested_menu.riv */,
E5637D79292BD26D000CBC1E /* skills_listener.riv */,
9D879D0A26578A5E00D01424 /* artboard_animations.riv */,
9D879D0826578A5400D01424 /* loopy.riv */,
Expand Down Expand Up @@ -416,6 +419,7 @@
E5A17A90299AA0F5008CC433 /* avatars.riv in Resources */,
9D879D0926578A5400D01424 /* loopy.riv in Resources */,
C3C07472283BE07300E8EB33 /* hero_editor.riv in Resources */,
E59C19102B07F6FE002F0CBA /* nested_menu.riv in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
E5F3FC4029B2661500D6D265 /* switch.riv in Resources */,
);
Expand Down
2 changes: 2 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import ErrorNotHandled from './ErrorNotHandled';
import ErrorHandledManually from './ErrorHandledManually';
import MeshExample from './MeshExample';
import DynamicText from './DynamicText';
import NestedInputs from './NestedInputs';
import Events from './Events';

const Stack = createStackNavigator();
Expand All @@ -35,6 +36,7 @@ export default function App() {
<Stack.Screen name="MeshExample" component={MeshExample} />
<Stack.Screen name="StateMachine" component={StateMachine} />
<Stack.Screen name="Events" component={Events} />
<Stack.Screen name="NestedInputs" component={NestedInputs} />
<Stack.Screen name="DynamicText" component={DynamicText} />
<Stack.Screen
name="MultipleArtboards"
Expand Down
8 changes: 8 additions & 0 deletions example/src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export default function Home({ navigation }) {
Events
</Button>

<Button
mode="contained"
onPress={() => navigation.navigate('NestedInputs')}
style={styles.buttonStyle}
>
Nested Inputs
</Button>

<Button
mode="contained"
onPress={() => navigation.navigate('DynamicText')}
Expand Down
36 changes: 36 additions & 0 deletions example/src/NestedInputs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as React from 'react';
import { SafeAreaView, ScrollView, StyleSheet } from 'react-native';
import Rive, { Alignment, Fit } from 'rive-react-native';

export default function NestedInputs() {
return (
<SafeAreaView style={styles.safeAreaViewContainer}>
<ScrollView contentContainerStyle={styles.container}>
<Rive
fit={Fit.Contain}
alignment={Alignment.Center}
style={styles.animation}
artboardName={'Main Artboard'}
autoplay={true}
stateMachineName="State Machine 1"
resourceName={'nested_menu'}
/>
</ScrollView>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
safeAreaViewContainer: {
flex: 1,
},
container: {
flexGrow: 1,
alignItems: 'center',
justifyContent: 'center',
},
animation: {
width: '100%',
height: 300,
},
});
2 changes: 1 addition & 1 deletion rive-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "React-Core"
s.dependency "RiveRuntime", "5.3.1"
s.dependency "RiveRuntime", "5.5.1"
end

0 comments on commit 7d3aa9f

Please sign in to comment.