Skip to content

Commit 2919972

Browse files
committed
chore: deps
1 parent 74ef9b4 commit 2919972

File tree

21 files changed

+1034
-39115
lines changed

21 files changed

+1034
-39115
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 🐛 Bug report
2+
description: Report a reproducible bug or regression in this library.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Bug report
9+
10+
👋 Hi!
11+
12+
**Please fill the following carefully before opening a new issue ❗**
13+
*(Your issue may be closed if it doesn't provide the required pieces of information)*
14+
- type: checkboxes
15+
attributes:
16+
label: Before submitting a new issue
17+
description: Please perform simple checks first.
18+
options:
19+
- label: I tested using the latest version of the library, as the bug might be already fixed.
20+
required: true
21+
- label: I tested using a [supported version](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) of react native.
22+
required: true
23+
- label: I checked for possible duplicate issues, with possible answers.
24+
required: true
25+
- type: textarea
26+
id: summary
27+
attributes:
28+
label: Bug summary
29+
description: |
30+
Provide a clear and concise description of what the bug is.
31+
If needed, you can also provide other samples: error messages / stack traces, screenshots, gifs, etc.
32+
validations:
33+
required: true
34+
- type: input
35+
id: library-version
36+
attributes:
37+
label: Library version
38+
description: What version of the library are you using?
39+
placeholder: "x.x.x"
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: react-native-info
44+
attributes:
45+
label: Environment info
46+
description: Run `react-native info` in your terminal and paste the results here.
47+
render: shell
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: steps-to-reproduce
52+
attributes:
53+
label: Steps to reproduce
54+
description: |
55+
You must provide a clear list of steps and code to reproduce the problem.
56+
value: |
57+
1. …
58+
2. …
59+
validations:
60+
required: true
61+
- type: input
62+
id: reproducible-example
63+
attributes:
64+
label: Reproducible example repository
65+
description: Please provide a link to a repository on GitHub with a reproducible example.
66+
render: js
67+
validations:
68+
required: true

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Request 💡
4+
url: https://github.com/lodev09/react-native-true-sheet/discussions/new?category=ideas
5+
about: If you have a feature request, please create a new discussion on GitHub.
6+
- name: Discussions on GitHub 💬
7+
url: https://github.com/lodev09/react-native-true-sheet/discussions
8+
about: If this library works as promised but you need help, please ask questions there.

.github/actions/setup/action.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ runs:
55
using: composite
66
steps:
77
- name: Setup Node.js
8-
uses: actions/setup-node@v3
8+
uses: actions/setup-node@v4
99
with:
1010
node-version-file: .nvmrc
1111

12-
- name: Cache dependencies
12+
- name: Restore dependencies
1313
id: yarn-cache
14-
uses: actions/cache@v3
14+
uses: actions/cache/restore@v4
1515
with:
1616
path: |
1717
**/node_modules
@@ -25,3 +25,12 @@ runs:
2525
if: steps.yarn-cache.outputs.cache-hit != 'true'
2626
run: yarn install --immutable
2727
shell: bash
28+
29+
- name: Cache dependencies
30+
if: steps.yarn-cache.outputs.cache-hit != 'true'
31+
uses: actions/cache/save@v4
32+
with:
33+
path: |
34+
**/node_modules
35+
.yarn/install-state.gz
36+
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

.github/workflows/ci.yml

+117-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Setup
2121
uses: ./.github/actions/setup
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

3535
- name: Setup
3636
uses: ./.github/actions/setup
@@ -42,10 +42,124 @@ jobs:
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Checkout
45-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
4646

4747
- name: Setup
4848
uses: ./.github/actions/setup
4949

5050
- name: Build package
5151
run: yarn prepare
52+
53+
build-android:
54+
runs-on: ubuntu-latest
55+
env:
56+
TURBO_CACHE_DIR: .turbo/android
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup
62+
uses: ./.github/actions/setup
63+
64+
- name: Cache turborepo for Android
65+
uses: actions/cache@v4
66+
with:
67+
path: ${{ env.TURBO_CACHE_DIR }}
68+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
69+
restore-keys: |
70+
${{ runner.os }}-turborepo-android-
71+
72+
- name: Check turborepo cache for Android
73+
run: |
74+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
75+
76+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
77+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
78+
fi
79+
80+
- name: Install JDK
81+
if: env.turbo_cache_hit != 1
82+
uses: actions/setup-java@v4
83+
with:
84+
distribution: 'zulu'
85+
java-version: '17'
86+
87+
- name: Finalize Android SDK
88+
if: env.turbo_cache_hit != 1
89+
run: |
90+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
91+
92+
- name: Cache Gradle
93+
if: env.turbo_cache_hit != 1
94+
uses: actions/cache@v4
95+
with:
96+
path: |
97+
~/.gradle/wrapper
98+
~/.gradle/caches
99+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
100+
restore-keys: |
101+
${{ runner.os }}-gradle-
102+
103+
- name: Build example for Android
104+
env:
105+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
106+
run: |
107+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
108+
109+
build-ios:
110+
runs-on: macos-latest
111+
env:
112+
TURBO_CACHE_DIR: .turbo/ios
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v4
116+
117+
- name: Setup
118+
uses: ./.github/actions/setup
119+
120+
- name: Cache turborepo for iOS
121+
uses: actions/cache@v4
122+
with:
123+
path: ${{ env.TURBO_CACHE_DIR }}
124+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
125+
restore-keys: |
126+
${{ runner.os }}-turborepo-ios-
127+
128+
- name: Check turborepo cache for iOS
129+
run: |
130+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
131+
132+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
133+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
134+
fi
135+
136+
- name: Restore cocoapods
137+
if: env.turbo_cache_hit != 1
138+
id: cocoapods-cache
139+
uses: actions/cache/restore@v4
140+
with:
141+
path: |
142+
**/ios/Pods
143+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
144+
restore-keys: |
145+
${{ runner.os }}-cocoapods-
146+
147+
- name: Install cocoapods
148+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
149+
run: |
150+
cd example/ios
151+
pod install
152+
env:
153+
NO_FLIPPER: 1
154+
155+
- name: Cache cocoapods
156+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
157+
uses: actions/cache/save@v4
158+
with:
159+
path: |
160+
**/ios/Pods
161+
key: ${{ steps.cocoapods-cache.outputs.cache-key }}
162+
163+
- name: Build example for iOS
164+
run: |
165+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ TrueSheet_kotlinVersion=2.0.21
22
TrueSheet_minSdkVersion=24
33
TrueSheet_targetSdkVersion=34
44
TrueSheet_compileSdkVersion=35
5-
TrueSheet_ndkversion=27.1.12297006
5+
TrueSheet_ndkVersion=27.1.12297006

example/README.md

+41-24
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,75 @@
11
# Getting Started
22

3-
>[!IMPORTANT]
4-
Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
3+
> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
54
6-
## Step 1: Start the Metro Server
5+
## Step 1: Start Metro
76

8-
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
7+
First, you will need to run **Metro**, the JavaScript build tool for React Native.
98

10-
To start Metro, run the following command from the _root_ of your React Native project:
9+
To start the Metro dev server, run the following command from the root of your React Native project:
1110

12-
```bash
13-
# using npm
11+
```sh
12+
# Using npm
1413
npm start
1514

1615
# OR using Yarn
1716
yarn start
1817
```
1918

20-
## Step 2: Start your Application
19+
## Step 2: Build and run your app
2120

22-
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
21+
With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:
2322

24-
### For Android
23+
### Android
2524

26-
```bash
27-
# using npm
25+
```sh
26+
# Using npm
2827
npm run android
2928

3029
# OR using Yarn
3130
yarn android
3231
```
3332

34-
### For iOS
33+
### iOS
3534

36-
```bash
37-
# using npm
35+
For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).
36+
37+
The first time you create a new project, run the Ruby bundler to install CocoaPods itself:
38+
39+
```sh
40+
bundle install
41+
```
42+
43+
Then, and every time you update your native dependencies, run:
44+
45+
```sh
46+
bundle exec pod install
47+
```
48+
49+
For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
50+
51+
```sh
52+
# Using npm
3853
npm run ios
3954

4055
# OR using Yarn
4156
yarn ios
4257
```
4358

44-
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
59+
If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.
60+
61+
This is one way to run your app — you can also build it directly from Android Studio or Xcode.
4562

46-
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
63+
## Step 3: Modify your app
4764

48-
## Step 3: Modifying your App
65+
Now that you have successfully run the app, let's make changes!
4966

50-
Now that you have successfully run the app, let's modify it.
67+
Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).
5168

52-
1. Open `App.tsx` in your text editor of choice and edit some lines.
53-
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
69+
When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:
5470

55-
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
71+
- **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).
72+
- **iOS**: Press <kbd>R</kbd> in iOS Simulator.
5673

5774
## Congratulations! :tada:
5875

@@ -61,11 +78,11 @@ You've successfully run and modified your React Native App. :partying_face:
6178
### Now what?
6279

6380
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
64-
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
81+
- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).
6582

6683
# Troubleshooting
6784

68-
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
85+
If you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
6986

7087
# Learn More
7188

example/android/app/src/main/java/truesheet/example/MainActivity.kt

-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ import com.facebook.react.ReactActivity
44
import com.facebook.react.ReactActivityDelegate
55
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
66
import com.facebook.react.defaults.DefaultReactActivityDelegate
7-
import android.os.Bundle
87

98
class MainActivity : ReactActivity() {
109

11-
override fun onCreate(savedInstanceState: Bundle?) {
12-
super.onCreate(null)
13-
}
14-
1510
/**
1611
* Returns the name of the main component registered from JavaScript. This is used to schedule
1712
* rendering of the component.

0 commit comments

Comments
 (0)