Skip to content

Commit 242abab

Browse files
authored
Merge pull request #6 from R4DIC4L/upgrade-react-native-72
#5 Incompatible with Gradle Version 9 - Upgrade react native 72
2 parents 9121642 + 16c935b commit 242abab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+20356
-10116
lines changed

android/build.gradle

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
// original location:
1111
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
1212

13-
def DEFAULT_COMPILE_SDK_VERSION = 31
14-
def DEFAULT_BUILD_TOOLS_VERSION = '31.0.0'
13+
def DEFAULT_COMPILE_SDK_VERSION = 33
14+
def DEFAULT_BUILD_TOOLS_VERSION = '33.0.0'
1515
def DEFAULT_MIN_SDK_VERSION = 21
16-
def DEFAULT_TARGET_SDK_VERSION = 31
16+
def DEFAULT_TARGET_SDK_VERSION = 33
17+
def DEFAULT_NDK_VERSION = "23.1.7779620"
1718

1819
def safeExtGet(prop, fallback) {
1920
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -33,11 +34,21 @@ buildscript {
3334
mavenCentral()
3435
}
3536
dependencies {
36-
classpath("com.android.tools.build:gradle:7.2.1")
37+
classpath("com.android.tools.build:gradle")
3738
classpath("com.facebook.react:react-native-gradle-plugin")
3839
classpath("de.undercouch:gradle-download-task:5.0.1")
3940
}
4041
}
42+
subprojects { project ->
43+
afterEvaluate {
44+
if ((project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library'))) {
45+
android {
46+
compileSdkVersion rootProject.ext.compileSdkVersion
47+
buildToolsVersion rootProject.ext.buildToolsVersion
48+
}
49+
}
50+
}
51+
}
4152
}
4253

4354
apply plugin: 'com.android.library'
@@ -49,6 +60,7 @@ android {
4960
defaultConfig {
5061
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
5162
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
63+
ndkVersion = safeExtGet('ndkVersion', DEFAULT_NDK_VERSION)
5264
versionCode 1
5365
versionName "1.0"
5466
}
@@ -127,7 +139,7 @@ afterEvaluate { project ->
127139
// }
128140

129141
task androidSourcesJar(type: Jar) {
130-
classifier = 'sources'
142+
archiveClassifier = 'sources'
131143
from android.sourceSets.main.java.srcDirs
132144
include '**/*.java'
133145
}

example/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
};

example/.gitignore

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,37 @@ build/
2828
.gradle
2929
local.properties
3030
*.iml
31+
*.hprof
32+
.cxx/
33+
*.keystore
34+
!debug.keystore
3135

3236
# node.js
3337
#
3438
node_modules/
3539
npm-debug.log
3640
yarn-error.log
3741

38-
# BUCK
39-
buck-out/
40-
\.buckd/
41-
*.keystore
42-
!debug.keystore
43-
4442
# fastlane
4543
#
4644
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4745
# screenshots whenever they are needed.
4846
# For more information about the recommended setup visit:
4947
# https://docs.fastlane.tools/best-practices/source-control/
5048

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
49+
**/fastlane/report.xml
50+
**/fastlane/Preview.html
51+
**/fastlane/screenshots
52+
**/fastlane/test_output
5453

5554
# Bundle artifact
5655
*.jsbundle
5756

58-
# CocoaPods
57+
# Ruby / CocoaPods
5958
/ios/Pods/
59+
/vendor/bundle/
60+
61+
# Temporary files created by Metro to check the health of the file watcher
62+
.metro-health-check*
63+
# testing
64+
/coverage

example/.prettierrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
printWidth: 99,
35
tabWidth: 2,
46
singleQuote: false,

example/App.js renamed to example/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from "react";
2-
import {StyleSheet, View, Button, Platform} from "react-native";
1+
import React from 'react';
2+
import { StyleSheet, View, Button, Platform } from "react-native";
33
import RNSystemSounds from "react-native-system-sounds";
44

5-
export default function App() {
5+
export default function App(): JSX.Element {
66
return (
77
<View style={styles.container}>
88
<Button

example/Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
3+
ruby ">= 2.6.10"
4+
gem 'cocoapods', '~> 1.12'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import 'react-native';
66
import React from 'react';
77
import App from '../App';
88

9+
10+
// Note: import explicitly to use the types shiped with jest.
11+
import {it} from '@jest/globals';
12+
913
// Note: test renderer must be required after react-native.
1014
import renderer from 'react-test-renderer';
1115

example/android/app/_BUCK

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

0 commit comments

Comments
 (0)