Skip to content

Commit 980e9c7

Browse files
committed
^ This is a combination of 2 commits.
^ This is the 1st commit message: Update RNTA to 0.73 ^ The commit message #2 will be skipped: ^ update RNTA
1 parent d75913f commit 980e9c7

32 files changed

+3230
-2312
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
new_arch_ios_build_only:
3434
executor:
3535
name: rn/macos
36-
xcode_version: '15.0.0'
36+
xcode_version: '15.3.0'
3737
steps:
3838
- checkout
3939
- run:
@@ -50,7 +50,7 @@ jobs:
5050
e2e_release_ios:
5151
executor:
5252
name: rn/macos
53-
xcode_version: '15.0.0'
53+
xcode_version: '15.3.0'
5454
steps:
5555
- checkout
5656
- run:

.flowconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ node_modules/react-native/Libraries/polyfills/.*
1515

1616
[untyped]
1717
.*/node_modules/@react-native-community/cli/.*/.*
18+
.*/test/.*
1819

1920
[include]
2021

@@ -63,4 +64,4 @@ untyped-import
6364
untyped-type-import
6465

6566
[version]
66-
^0.182.0
67+
^0.217.0

RNDateTimePicker.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
1010
s.license = package['license']
1111
s.author = package['author']
1212
s.homepage = package['homepage']
13-
s.platforms = { :ios => "11.0", :visionos => "1.0" }
13+
s.platforms = { :ios => "11.0", :visionos => "1.0" }
1414
s.source = { :git => "https://github.com/react-native-community/datetimepicker", :tag => "v#{s.version}" }
1515
s.source_files = "ios/**/*.{h,m,mm,cpp}"
1616
s.requires_arc = true

android/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.reactcommunity.rndatetimepicker">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application />
33
</manifest>

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const isLintingOrTesting =
44
module.exports = {
55
presets: [
66
[
7-
'module:metro-react-native-babel-preset',
7+
'module:@react-native/babel-preset',
88
// this is a workaround for some deeper issue
99
{useTransformReactJSXExperimental: !isLintingOrTesting},
1010
],

example/.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
.gradle/
77
.idea/
88
.vs/
9+
.xcode.env
910
Pods/
1011
build/
11-
dist/
12+
dist/*
13+
!dist/.gitignore
1214
local.properties
1315
msbuild.binlog
1416
node_modules/

example/App.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
IOS_MODE,
2626
ANDROID_DISPLAY,
2727
IOS_DISPLAY,
28-
} from '../src/constants';
28+
} from '@react-native-community/datetimepicker/src/constants';
2929
import * as RNLocalize from 'react-native-localize';
3030

3131
const timezone = [
@@ -632,3 +632,5 @@ const styles = StyleSheet.create({
632632
width: 350,
633633
},
634634
});
635+
636+
export default App;

example/android/build.gradle

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
buildscript {
2-
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
3-
apply(from: "${androidTestAppDir}/dependencies.gradle")
2+
apply(from: {
3+
def searchDir = rootDir.toPath()
4+
do {
5+
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
6+
if (p.toFile().exists()) {
7+
return p.toRealPath().toString()
8+
}
9+
} while (searchDir = searchDir.getParent())
10+
throw new GradleException("Could not find `react-native-test-app`");
11+
}())
412

513
repositories {
614
mavenCentral()
@@ -18,14 +26,23 @@ allprojects {
1826
repositories {
1927
maven {
2028
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21-
url("${rootDir}/../../node_modules/react-native/android")
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()
35+
}
36+
} while (searchDir = searchDir.getParent())
37+
throw new GradleException("Could not find `react-native`");
38+
}())
2239
}
40+
maven {
41+
// All of Detox' artifacts are provided via the npm module
42+
url "$rootDir/../../node_modules/detox/Detox-android"
43+
}
2344
mavenCentral()
2445
google()
25-
maven {
26-
// All of Detox' artifacts are provided via the npm module
27-
url "$rootDir/../../node_modules/detox/Detox-android"
28-
}
2946
}
3047
afterEvaluate { project ->
3148
def androidExtension = project.extensions.findByName('android')

example/android/gradle.properties

+20-12
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,28 @@ org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryEr
2626
android.useAndroidX=true
2727
# Automatically convert third-party libraries to use AndroidX
2828
android.enableJetifier=true
29-
30-
# Version of Flipper to use with React Native. Default value is whatever React
31-
# Native defaults to. To disable Flipper, set it to `false`.
32-
FLIPPER_VERSION=false
33-
34-
# Enable Fabric at runtime.
35-
#USE_FABRIC=1
36-
37-
# Enable new architecture, i.e. Fabric + TurboModule - implies USE_FABRIC=1.
29+
# Jetifier randomly fails on these libraries
30+
android.jetifier.ignorelist=hermes-android
31+
32+
# Use this property to specify which architecture you want to build.
33+
# You can also override it from the CLI using
34+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
35+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
36+
37+
# Use this property to enable support to the new architecture.
38+
# This will allow you to use TurboModules and the Fabric render in
39+
# your application. You should enable this flag either if you want
40+
# to write custom TurboModules/Fabric components OR use libraries that
41+
# are providing them.
3842
# Note that this is incompatible with web debugging.
3943
#newArchEnabled=true
44+
#bridgelessEnabled=true
45+
46+
# Uncomment the line below to build React Native from source.
47+
#react.buildFromSource=true
4048

41-
# Uncomment the line below if building react-native from source
42-
#ANDROID_NDK_VERSION=21.4.7075529
49+
# Version of Android NDK to build against.
50+
#ANDROID_NDK_VERSION=26.1.10909125
4351

4452
# Version of Kotlin to build against.
45-
#KOTLIN_VERSION=1.7.10
53+
#KOTLIN_VERSION=1.8.22
-16.9 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

example/android/gradlew

+22-13
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

example/android/gradlew.bat

+11-10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -42,11 +43,11 @@ set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
4344
if %ERRORLEVEL% equ 0 goto execute
4445

45-
echo.
46-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47-
echo.
48-
echo Please set the JAVA_HOME variable in your environment to match the
49-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5051

5152
goto fail
5253

@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5657

5758
if exist "%JAVA_EXE%" goto execute
5859

59-
echo.
60-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61-
echo.
62-
echo Please set the JAVA_HOME variable in your environment to match the
63-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6465

6566
goto fail
6667

example/android/settings.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,14 @@ pluginManagement {
88

99
rootProject.name = "date-time-picker-example"
1010

11-
apply(from: "../../node_modules/react-native-test-app/test-app.gradle")
11+
apply(from: {
12+
def searchDir = rootDir.toPath()
13+
do {
14+
def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle")
15+
if (p.toFile().exists()) {
16+
return p.toRealPath().toString()
17+
}
18+
} while (searchDir = searchDir.getParent())
19+
throw new GradleException("Could not find `react-native-test-app`");
20+
}())
1221
applyTestAppSettings(settings)

example/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:@react-native/babel-preset'],
3+
};

example/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import {AppRegistry} from 'react-native';
6-
import {App} from './App';
6+
import App from './App';
77
import {name as appName} from './app.json';
88

99
AppRegistry.registerComponent(appName, () => App);

example/ios/Podfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
require_relative '../../node_modules/react-native-test-app/test_app'
1+
ws_dir = Pathname.new(__dir__)
2+
ws_dir = ws_dir.parent until
3+
File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
4+
ws_dir.expand_path.to_s == '/'
5+
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"
26

37
workspace 'date-time-picker-example.xcworkspace'
48

5-
# Flipper causes the build to fail on release when fabric is enabled
6-
# https://github.com/facebook/react-native/issues/33764
7-
8-
use_flipper! false unless ENV['ENABLE_FLIPPER']
9-
109
use_test_app!

0 commit comments

Comments
 (0)