Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5 Incompatible with Gradle Version 9 - Upgrade react native 72 #6

Merged
merged 5 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle

def DEFAULT_COMPILE_SDK_VERSION = 31
def DEFAULT_BUILD_TOOLS_VERSION = '31.0.0'
def DEFAULT_COMPILE_SDK_VERSION = 33
def DEFAULT_BUILD_TOOLS_VERSION = '33.0.0'
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_TARGET_SDK_VERSION = 31
def DEFAULT_TARGET_SDK_VERSION = 33
def DEFAULT_NDK_VERSION = "23.1.7779620"

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
Expand All @@ -33,11 +34,21 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.1")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
}
}
subprojects { project ->
afterEvaluate {
if ((project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
}

apply plugin: 'com.android.library'
Expand All @@ -49,6 +60,7 @@ android {
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
ndkVersion = safeExtGet('ndkVersion', DEFAULT_NDK_VERSION)
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -127,7 +139,7 @@ afterEvaluate { project ->
// }

task androidSourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier = 'sources'
from android.sourceSets.main.java.srcDirs
include '**/*.java'
}
Expand Down
2 changes: 1 addition & 1 deletion example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
};
25 changes: 15 additions & 10 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,37 @@ build/
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# CocoaPods
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# testing
/coverage
2 changes: 2 additions & 0 deletions example/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
printWidth: 99,
tabWidth: 2,
singleQuote: false,
Expand Down
6 changes: 3 additions & 3 deletions example/App.js → example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import {StyleSheet, View, Button, Platform} from "react-native";
import React from 'react';
import { StyleSheet, View, Button, Platform } from "react-native";
import RNSystemSounds from "react-native-system-sounds";

export default function App() {
export default function App(): JSX.Element {
return (
<View style={styles.container}>
<Button
Expand Down
4 changes: 4 additions & 0 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.12'
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import 'react-native';
import React from 'react';
import App from '../App';


// Note: import explicitly to use the types shiped with jest.
import {it} from '@jest/globals';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

Expand Down
55 changes: 0 additions & 55 deletions example/android/app/_BUCK

This file was deleted.

Loading