Skip to content

Commit 285163c

Browse files
committed
chore(example): migrate to react-native-test-app
1 parent 9b0039d commit 285163c

File tree

90 files changed

+9019
-6064
lines changed

Some content is hidden

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

90 files changed

+9019
-6064
lines changed

example/.eslintrc.js

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

example/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.binlog
2+
*.hprof
3+
*.xcworkspace/
4+
*.zip
5+
.DS_Store
6+
.gradle/
7+
.idea/
8+
.vs/
9+
.xcode.env
10+
Pods/
11+
build/
12+
dist/*
13+
!dist/.gitignore
14+
local.properties
15+
msbuild.binlog
16+
node_modules/

example/.prettierrc.json

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

example/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

example/Gemfile

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

example/android/app/build.gradle

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

example/android/app/proguard-rules.pro

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

example/android/app/src/debug/AndroidManifest.xml

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

example/android/app/src/main/AndroidManifest.xml

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

example/android/app/src/main/java/com/example/MainActivity.kt

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

example/android/app/src/main/java/com/example/MainApplication.kt

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

example/android/app/src/main/res/drawable/rn_edit_text_material.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

example/android/app/src/main/res/values/strings.xml

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

example/android/app/src/main/res/values/styles.xml

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

example/android/build.gradle

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
11
buildscript {
2-
ext {
3-
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 21
5-
compileSdkVersion = 34
6-
targetSdkVersion = 34
7-
ndkVersion = "25.1.8937393"
8-
kotlinVersion = "1.8.0"
9-
}
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+
}())
12+
1013
repositories {
11-
google()
1214
mavenCentral()
15+
google()
1316
}
17+
1418
dependencies {
15-
classpath("com.android.tools.build:gradle")
16-
classpath("com.facebook.react:react-native-gradle-plugin")
17-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
19+
getReactNativeDependencies().each { dependency ->
20+
classpath(dependency)
21+
}
1822
}
1923
}
2024

21-
apply plugin: "com.facebook.react.rootproject"
25+
allprojects {
26+
repositories {
27+
maven {
28+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
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+
}())
39+
}
40+
mavenCentral()
41+
google()
42+
}
43+
}
File renamed without changes.

0 commit comments

Comments
 (0)