Skip to content

Commit 041c67d

Browse files
Merge pull request #74 from OpenDTU-App/upgrade-react-native
2 parents 7a8d706 + ac62267 commit 041c67d

35 files changed

+13759
-10428
lines changed

.github/workflows/pull-requests.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,20 @@ jobs:
2121
run: git fetch --tags
2222

2323
- name: Setup JDK
24-
uses: actions/setup-java@v3.12.0
24+
uses: actions/setup-java@v4
2525
with:
26-
java-version: 11
26+
java-version: 17
2727
distribution: 'adopt'
2828

29-
- name: Get yarn cache directory path
30-
id: yarn-cache-dir-path
31-
run: |
32-
echo "{dir}={$(yarn cache dir)}" >> $GITHUB_OUTPUT
33-
echo "::set-output name=dir::{$(yarn cache dir)}"
34-
cat $GITHUB_OUTPUT
35-
36-
- name: Restore node_modules from cache
37-
uses: actions/cache@v3
38-
id: yarn-cache
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
3931
with:
40-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
41-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
42-
restore-keys: |
43-
${{ runner.os }}-yarn-
32+
node-version: '18'
33+
cache: 'yarn'
4434

45-
- name: Install dependencies
46-
run: yarn install --frozen-lockfile --prefer-offline
35+
- name: Install node modules
36+
run: |
37+
yarn install --immutable --immutable-cache --check-cache
4738
4839
- name: Cache Gradle Wrapper
4940
uses: actions/cache@v3

.github/workflows/release.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,20 @@ jobs:
2222
run: git fetch --tags --force
2323

2424
- name: Setup JDK
25-
uses: actions/setup-java@v3.12.0
25+
uses: actions/setup-java@v4
2626
with:
27-
java-version: 11
27+
java-version: 17
2828
distribution: 'adopt'
2929

30-
- name: Get yarn cache directory path
31-
id: yarn-cache-dir-path
32-
run: |
33-
echo "{dir}={$(yarn cache dir)}" >> $GITHUB_OUTPUT
34-
echo "::set-output name=dir::{$(yarn cache dir)}"
35-
cat $GITHUB_OUTPUT
36-
37-
- name: Restore node_modules from cache
38-
uses: actions/cache@v3
39-
id: yarn-cache
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
4032
with:
41-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
42-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
43-
restore-keys: |
44-
${{ runner.os }}-yarn-
33+
node-version: '18'
34+
cache: 'yarn'
4535

46-
- name: Install dependencies
47-
run: yarn install --frozen-lockfile --prefer-offline
36+
- name: Install node modules
37+
run: |
38+
yarn install --immutable --immutable-cache --check-cache
4839
4940
- name: Cache Gradle Wrapper
5041
uses: actions/cache@v3

.github/workflows/testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818

1919
- name: Setup Node
2020
uses: actions/setup-node@v4
21-
22-
- name: Cache node modules
23-
uses: c-hive/gha-yarn-cache@v1
21+
with:
22+
node-version: '18'
23+
cache: 'yarn'
2424

2525
- name: Install node modules
2626
run: |
27-
yarn install --frozen-lockfile --prefer-offline
27+
yarn install --immutable --immutable-cache --check-cache
2828
2929
- name: Run ESLint
3030
run: |

.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -56,11 +56,19 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161

6262
# Temporary files created by Metro to check the health of the file watcher
6363
.metro-health-check*
6464

6565
# testing
6666
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

.yarn/releases/yarn-3.6.4.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.13'
7-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

__tests__/App.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @format
33
*/
4-
// Note: import explicitly to use the types shiped with jest.
4+
// Note: import explicitly to use the types shipped with jest.
55
import { it } from '@jest/globals';
66

77
import React from 'react';

android/app/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
45

@@ -72,7 +73,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7273
android {
7374
ndkVersion rootProject.ext.ndkVersion
7475

75-
compileSdkVersion rootProject.ext.compileSdkVersion
76+
buildToolsVersion rootProject.ext.buildToolsVersion
77+
compileSdk rootProject.ext.compileSdkVersion
7678

7779
namespace "xyz.commanderred.opendtuapp"
7880
defaultConfig {
@@ -135,12 +137,6 @@ dependencies {
135137
// The version of react-native is set by the React Native Gradle Plugin
136138
implementation("com.facebook.react:react-android")
137139

138-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
139-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
140-
exclude group:'com.squareup.okhttp3', module:'okhttp'
141-
}
142-
143-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
144140
if (hermesEnabled.toBoolean()) {
145141
implementation("com.facebook.react:hermes-android")
146142
} else {
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
4-
5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
3+
xmlns:tools="http://schemas.android.com/tools">
64

75
<application
8-
android:usesCleartextTraffic="true"
9-
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
6+
android:usesCleartextTraffic="true"
7+
tools:targetApi="28"
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

0 commit comments

Comments
 (0)