Skip to content

Commit a20f19d

Browse files
committed
Restore example to its original state
1 parent 04e112c commit a20f19d

Some content is hidden

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

54 files changed

+2658
-6341
lines changed

example/.gitignore

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,74 @@
1-
*.binlog
2-
*.hprof
3-
*.xcworkspace/
4-
*.zip
1+
# OSX
2+
#
53
.DS_Store
6-
.gradle/
7-
.idea/
8-
.vs/
9-
.xcode.env
10-
Pods/
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
**/.xcode.env.local
24+
25+
# Android/IntelliJ
26+
#
1127
build/
12-
dist/*
13-
!dist/.gitignore
28+
.idea
29+
.gradle
1430
local.properties
15-
msbuild.binlog
31+
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
36+
37+
# node.js
38+
#
1639
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# fastlane
44+
#
45+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46+
# screenshots whenever they are needed.
47+
# For more information about the recommended setup visit:
48+
# https://docs.fastlane.tools/best-practices/source-control/
49+
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# Ruby / CocoaPods
59+
**/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*
64+
65+
# testing
66+
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

example/.watchmanconfig

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

example/Gemfile.lock

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (7.0.6)
9+
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
i18n (>= 1.6, < 2)
11+
minitest (>= 5.1)
12+
tzinfo (~> 2.0)
13+
addressable (2.8.7)
14+
public_suffix (>= 2.0.2, < 7.0)
15+
algoliasearch (1.27.5)
16+
httpclient (~> 2.8, >= 2.8.3)
17+
json (>= 1.5.1)
18+
atomos (0.1.3)
19+
base64 (0.2.0)
20+
claide (1.1.0)
21+
cocoapods (1.14.3)
22+
addressable (~> 2.8)
23+
claide (>= 1.0.2, < 2.0)
24+
cocoapods-core (= 1.14.3)
25+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
26+
cocoapods-downloader (>= 2.1, < 3.0)
27+
cocoapods-plugins (>= 1.0.0, < 2.0)
28+
cocoapods-search (>= 1.0.0, < 2.0)
29+
cocoapods-trunk (>= 1.6.0, < 2.0)
30+
cocoapods-try (>= 1.1.0, < 2.0)
31+
colored2 (~> 3.1)
32+
escape (~> 0.0.4)
33+
fourflusher (>= 2.3.0, < 3.0)
34+
gh_inspector (~> 1.0)
35+
molinillo (~> 0.8.0)
36+
nap (~> 1.0)
37+
ruby-macho (>= 2.3.0, < 3.0)
38+
xcodeproj (>= 1.23.0, < 2.0)
39+
cocoapods-core (1.14.3)
40+
activesupport (>= 5.0, < 8)
41+
addressable (~> 2.8)
42+
algoliasearch (~> 1.0)
43+
concurrent-ruby (~> 1.1)
44+
fuzzy_match (~> 2.0.4)
45+
nap (~> 1.0)
46+
netrc (~> 0.11)
47+
public_suffix (~> 4.0)
48+
typhoeus (~> 1.0)
49+
cocoapods-deintegrate (1.0.5)
50+
cocoapods-downloader (2.1)
51+
cocoapods-plugins (1.0.0)
52+
nap
53+
cocoapods-search (1.0.1)
54+
cocoapods-trunk (1.6.0)
55+
nap (>= 0.8, < 2.0)
56+
netrc (~> 0.11)
57+
cocoapods-try (1.2.0)
58+
colored2 (3.1.2)
59+
concurrent-ruby (1.2.2)
60+
escape (0.0.4)
61+
ethon (0.16.0)
62+
ffi (>= 1.15.0)
63+
ffi (1.17.0)
64+
fourflusher (2.3.1)
65+
fuzzy_match (2.0.4)
66+
gh_inspector (1.1.3)
67+
httpclient (2.8.3)
68+
i18n (1.14.1)
69+
concurrent-ruby (~> 1.0)
70+
json (2.7.2)
71+
minitest (5.18.1)
72+
molinillo (0.8.0)
73+
nanaimo (0.3.0)
74+
nap (1.1.0)
75+
netrc (0.11.0)
76+
nkf (0.2.0)
77+
public_suffix (4.0.7)
78+
rexml (3.2.9)
79+
strscan
80+
ruby-macho (2.5.1)
81+
strscan (3.1.0)
82+
typhoeus (1.4.1)
83+
ethon (>= 0.9.0)
84+
tzinfo (2.0.6)
85+
concurrent-ruby (~> 1.0)
86+
xcodeproj (1.24.0)
87+
CFPropertyList (>= 2.3.3, < 4.0)
88+
atomos (~> 0.1.3)
89+
claide (>= 1.0.2, < 2.0)
90+
colored2 (~> 3.1)
91+
nanaimo (~> 0.3.0)
92+
rexml (~> 3.2.4)
93+
94+
PLATFORMS
95+
ruby
96+
97+
DEPENDENCIES
98+
activesupport (>= 6.1.7.5, < 7.1.0)
99+
cocoapods (>= 1.13, < 1.15)
100+
101+
RUBY VERSION
102+
ruby 2.7.4p191
103+
104+
BUNDLED WITH
105+
2.2.33

example/android/app/build.gradle

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
3+
apply plugin: "com.facebook.react"
4+
5+
import com.android.build.OutputFile
6+
7+
/**
8+
* This is the configuration block to customize your React Native Android app.
9+
* By default you don't need to apply any configuration, just uncomment the lines you need.
10+
*/
11+
react {
12+
/* Folders */
13+
// The root of your project, i.e. where "package.json" lives. Default is '..'
14+
// root = file("../")
15+
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
16+
// reactNativeDir = file("../node-modules/react-native")
17+
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
18+
// codegenDir = file("../node-modules/react-native-codegen")
19+
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
20+
// cliFile = file("../node_modules/react-native/cli.js")
21+
22+
/* Variants */
23+
// The list of variants to that are debuggable. For those we're going to
24+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
25+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
26+
// debuggableVariants = ["liteDebug", "prodDebug"]
27+
28+
/* Bundling */
29+
// A list containing the node command and its flags. Default is just 'node'.
30+
// nodeExecutableAndArgs = ["node"]
31+
//
32+
// The command to run when bundling. By default is 'bundle'
33+
// bundleCommand = "ram-bundle"
34+
//
35+
// The path to the CLI configuration file. Default is empty.
36+
// bundleConfig = file(../rn-cli.config.js)
37+
//
38+
// The name of the generated asset file containing your JS bundle
39+
// bundleAssetName = "MyApplication.android.bundle"
40+
//
41+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
42+
// entryFile = file("../js/MyApplication.android.js")
43+
//
44+
// A list of extra flags to pass to the 'bundle' commands.
45+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
46+
// extraPackagerArgs = []
47+
48+
/* Hermes Commands */
49+
// The hermes compiler command to run. By default it is 'hermesc'
50+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
51+
//
52+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
53+
// hermesFlags = ["-O", "-output-source-map"]
54+
}
55+
56+
/**
57+
* Set this to true to create four separate APKs instead of one,
58+
* one for each native architecture. This is useful if you don't
59+
* use App Bundles (https://developer.android.com/guide/app-bundle/)
60+
* and want to have separate APKs to upload to the Play Store.
61+
*/
62+
def enableSeparateBuildPerCPUArchitecture = false
63+
64+
/**
65+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
66+
*/
67+
def enableProguardInReleaseBuilds = false
68+
69+
/**
70+
* The preferred build flavor of JavaScriptCore (JSC)
71+
*
72+
* For example, to use the international variant, you can use:
73+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
74+
*
75+
* The international variant includes ICU i18n library and necessary data
76+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
77+
* give correct results when using with locales other than en-US. Note that
78+
* this variant is about 6MiB larger per architecture than default.
79+
*/
80+
def jscFlavor = 'org.webkit:android-jsc:+'
81+
82+
/**
83+
* Private function to get the list of Native Architectures you want to build.
84+
* This reads the value from reactNativeArchitectures in your gradle.properties
85+
* file and works together with the --active-arch-only flag of react-native run-android.
86+
*/
87+
def reactNativeArchitectures() {
88+
def value = project.getProperties().get("reactNativeArchitectures")
89+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
90+
}
91+
92+
android {
93+
ndkVersion rootProject.ext.ndkVersion
94+
95+
buildToolsVersion rootProject.ext.buildToolsVersion
96+
compileSdk rootProject.ext.compileSdkVersion
97+
98+
namespace "com.rnsacexample"
99+
defaultConfig {
100+
applicationId "com.rnsacexample"
101+
minSdkVersion rootProject.ext.minSdkVersion
102+
targetSdkVersion rootProject.ext.targetSdkVersion
103+
versionCode 1
104+
versionName "1.0"
105+
}
106+
107+
splits {
108+
abi {
109+
reset()
110+
enable enableSeparateBuildPerCPUArchitecture
111+
universalApk false // If true, also generate a universal APK
112+
include (*reactNativeArchitectures())
113+
}
114+
}
115+
signingConfigs {
116+
debug {
117+
storeFile file('debug.keystore')
118+
storePassword 'android'
119+
keyAlias 'androiddebugkey'
120+
keyPassword 'android'
121+
}
122+
}
123+
buildTypes {
124+
debug {
125+
signingConfig signingConfigs.debug
126+
}
127+
release {
128+
// Caution! In production, you need to generate your own keystore file.
129+
// see https://reactnative.dev/docs/signed-apk-android.
130+
signingConfig signingConfigs.debug
131+
minifyEnabled enableProguardInReleaseBuilds
132+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
133+
}
134+
}
135+
136+
// applicationVariants are e.g. debug, release
137+
applicationVariants.all { variant ->
138+
variant.outputs.each { output ->
139+
// For each separate APK per architecture, set a unique version code as described here:
140+
// https://developer.android.com/studio/build/configure-apk-splits.html
141+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
142+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
143+
def abi = output.getFilter(OutputFile.ABI)
144+
if (abi != null) { // null for the universal-debug, universal-release variants
145+
output.versionCodeOverride =
146+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
147+
}
148+
149+
}
150+
}
151+
}
152+
153+
dependencies {
154+
// The version of react-native is set by the React Native Gradle Plugin
155+
implementation("com.facebook.react:react-android")
156+
157+
if (hermesEnabled.toBoolean()) {
158+
implementation("com.facebook.react:hermes-android")
159+
} else {
160+
implementation jscFlavor
161+
}
162+
}
163+
164+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/android/app/debug.keystore

2.2 KB
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application
6+
android:usesCleartextTraffic="true"
7+
tools:targetApi="28"
8+
tools:ignore="GoogleAppIndexingWarning" />
9+
</manifest>

0 commit comments

Comments
 (0)