Skip to content

Commit fef5d34

Browse files
authored
feat: bump example to 0.81, fix compilation errors (#1156)
1 parent 24663b8 commit fef5d34

File tree

14 files changed

+2542
-1505
lines changed

14 files changed

+2542
-1505
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Build
22
on:
33
push:
4-
pull_request:
54
branches:
6-
- master
5+
- main
6+
pull_request:
7+
workflow_dispatch:
78

89
jobs:
910
lint:
@@ -95,8 +96,9 @@ jobs:
9596
- name: Install Dependencies
9697
run: yarn && yarn bootstrap
9798
- name: Install Podfiles
98-
run: cd example && npx pod-install
99+
run: cd example && RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
99100
- name: Print React Native Info
100101
run: cd example && npx react-native info
101102
- name: Build example app
102-
run: cd example && yarn ios --no-packager
103+
run: xcodebuild -scheme ReactTestApp -workspace MenuExample.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
104+
working-directory: example/ios

android/.settings/org.eclipse.buildship.core.prefs

Lines changed: 0 additions & 13 deletions
This file was deleted.
-53.1 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

android/src/main/java/com/reactnativemenu/MenuView.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
2424
private var mIsOnLongPress = false
2525
private var mGestureDetector: GestureDetector
2626
private var mHitSlopRect: Rect? = null
27+
set(value) {
28+
super.hitSlopRect = value
29+
mHitSlopRect = value
30+
updateTouchDelegate()
31+
}
2732

2833
init {
2934
mGestureDetector = GestureDetector(mContext, object : GestureDetector.SimpleOnGestureListener() {
@@ -47,12 +52,6 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
4752
prepareMenu()
4853
}
4954

50-
override fun setHitSlopRect(rect: Rect?) {
51-
super.setHitSlopRect(rect)
52-
mHitSlopRect = rect
53-
updateTouchDelegate()
54-
}
55-
5655
override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
5756
return true
5857
}

android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
123123
fun setHitSlop(view: ReactViewGroup, @Nullable hitSlop: ReadableMap?) {
124124
if (hitSlop == null) {
125125
// We should keep using setters as `Val cannot be reassigned`
126-
view.setHitSlopRect(null)
126+
view.hitSlopRect = null
127127
} else {
128-
view.setHitSlopRect(
128+
view.hitSlopRect = (
129129
Rect(
130130
if (hitSlop.hasKey("left"))
131131
PixelUtil.toPixelFromDIP(hitSlop.getDouble("left")).toInt()
@@ -206,7 +206,7 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
206206

207207
@ReactProp(name = ViewProps.OVERFLOW)
208208
fun setOverflow(view: ReactViewGroup, overflow: String?) {
209-
view.setOverflow(overflow)
209+
view.overflow = overflow
210210
}
211211

212212
@ReactProp(name = "backfaceVisibility")

example/android/build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ buildscript {
2424

2525
allprojects {
2626
repositories {
27-
maven {
28-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
29-
url({
30-
def searchDir = rootDir.toPath()
31-
do {
32-
def p = searchDir.resolve("node_modules/react-native/android")
33-
if (p.toFile().exists()) {
34-
return p.toRealPath().toString()
27+
{
28+
def searchDir = rootDir.toPath()
29+
do {
30+
def p = searchDir.resolve("node_modules/react-native/android")
31+
if (p.toFile().exists()) {
32+
maven {
33+
url(p.toRealPath().toString())
3534
}
36-
} while (searchDir = searchDir.getParent())
37-
throw new GradleException("Could not find `react-native`");
38-
}())
39-
}
35+
break
36+
}
37+
} while (searchDir = searchDir.getParent())
38+
// As of 0.80, React Native is no longer installed from npm
39+
}()
4040
mavenCentral()
4141
google()
4242
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)