Skip to content

Commit 73a3039

Browse files
committed
chore(example, deps): use modern android versions in random values
1 parent c022729 commit 73a3039

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
diff --git a/node_modules/react-native-get-random-values/android/build.gradle b/node_modules/react-native-get-random-values/android/build.gradle
2+
index 8dfd8b9..3c7b8ea 100644
3+
--- a/node_modules/react-native-get-random-values/android/build.gradle
4+
+++ b/node_modules/react-native-get-random-values/android/build.gradle
5+
@@ -1,11 +1,17 @@
6+
-
7+
buildscript {
8+
- repositories {
9+
- jcenter()
10+
- }
11+
-
12+
- dependencies {
13+
- classpath 'com.android.tools.build:gradle:1.3.1'
14+
+ // The Android Gradle plugin is only required when opening the android folder stand-alone.
15+
+ // This avoids unnecessary downloads and potential conflicts when the library is included as a
16+
+ // module dependency in an application project.
17+
+ if (project == rootProject) {
18+
+ repositories {
19+
+ mavenCentral()
20+
+ google()
21+
+ }
22+
+ def buildGradleVersion = ext.has('buildGradlePluginVersion') ? ext.get('buildGradlePluginVersion') : '7.0.3'
23+
+
24+
+ dependencies {
25+
+ classpath "com.android.tools.build:gradle:$buildGradleVersion"
26+
+ }
27+
}
28+
}
29+
30+
@@ -16,12 +22,12 @@ def safeExtGet(prop, fallback) {
31+
}
32+
33+
android {
34+
- compileSdkVersion safeExtGet('compileSdkVersion', 26)
35+
- buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')
36+
+ compileSdkVersion safeExtGet('compileSdkVersion', 31)
37+
+ buildToolsVersion safeExtGet('buildToolsVersion', '30.0.3')
38+
39+
defaultConfig {
40+
minSdkVersion safeExtGet('minSdkVersion', 16)
41+
- targetSdkVersion safeExtGet('targetSdkVersion', 26)
42+
+ targetSdkVersion safeExtGet('targetSdkVersion', 30)
43+
versionCode 1
44+
versionName "1.0"
45+
}
46+
@@ -32,6 +38,11 @@ android {
47+
48+
repositories {
49+
mavenCentral()
50+
+ google()
51+
+ maven {
52+
+ // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
53+
+ url "$rootDir/../node_modules/react-native/android"
54+
+ }
55+
}
56+
57+
dependencies {

0 commit comments

Comments
 (0)