├── .gitignore
├── Application
├── .gitignore
├── .idea
│ ├── .name
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ └── vcs.xml
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── project.properties
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── me
│ │ │ └── com
│ │ │ └── myapplication
│ │ │ └── ApplicationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── me
│ │ │ │ └── com
│ │ │ │ └── myapplication
│ │ │ │ ├── AppActivity.java
│ │ │ │ └── MyApplication.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_app.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ └── styles.xml
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── me
│ │ └── com
│ │ └── myapplication
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── README.md
├── lib
├── .buckconfig
├── .flowconfig
├── .gitignore
├── .watchmanconfig
├── android
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── keystores
│ │ ├── BUCK
│ │ └── debug.keystore.properties
│ ├── lib
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── lib
│ │ │ │ └── LibActivity.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ └── settings.gradle
├── index.android.js
└── package.json
└── notes
├── normal_apk_de_count.txt
├── react_native_apk_de_count.txt
└── react_native_proguarded_apk_de_count.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | lib/node_modules/
3 | saved_apk/
4 |
--------------------------------------------------------------------------------
/Application/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/Application/.idea/.name:
--------------------------------------------------------------------------------
1 | MyApplication
--------------------------------------------------------------------------------
/Application/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Application/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Application/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Application/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/Application/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
--------------------------------------------------------------------------------
/Application/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Application/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Application/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Application/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Application/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Application/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Application/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.1"
6 |
7 | defaultConfig {
8 | applicationId "me.com.myapplication"
9 | minSdkVersion 16
10 | targetSdkVersion 24
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled true
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | testCompile 'junit:junit:4.12'
24 |
25 | compile(name: 'lib-debug', ext: 'aar')
26 | compile 'com.facebook.react:react-native:0.32.0'
27 | compile 'com.android.support:appcompat-v7:24.1.1'
28 | compile 'com.android.support:design:24.1.1'
29 | }
30 |
31 | repositories {
32 | mavenLocal()
33 | flatDir {
34 | dirs '../../lib/android/lib/build/outputs/aar/'
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Application/app/proguard-rules.pro:
--------------------------------------------------------------------------------
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:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/Application/app/project.properties:
--------------------------------------------------------------------------------
1 | manifestmerger.enabled=true
2 |
--------------------------------------------------------------------------------
/Application/app/src/androidTest/java/me/com/myapplication/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package me.com.myapplication;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Application/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Application/app/src/main/java/me/com/myapplication/AppActivity.java:
--------------------------------------------------------------------------------
1 | package me.com.myapplication;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.view.View;
7 |
8 | public class AppActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_app);
14 |
15 | findViewById(R.id.start_lib).setOnClickListener(new View.OnClickListener() {
16 | @Override
17 | public void onClick(View view) {
18 | startLib();
19 | }
20 | });
21 | }
22 |
23 | private void startLib() {
24 | Intent intent = new Intent(this, com.lib.LibActivity.class);
25 | startActivity(intent);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Application/app/src/main/java/me/com/myapplication/MyApplication.java:
--------------------------------------------------------------------------------
1 | package me.com.myapplication;
2 |
3 | import com.facebook.react.ReactApplication;
4 | import com.facebook.react.ReactNativeHost;
5 | import com.facebook.react.ReactPackage;
6 | import com.facebook.react.shell.MainReactPackage;
7 |
8 | import android.app.Application;
9 |
10 | import java.util.Collections;
11 | import java.util.List;
12 |
13 | public class MyApplication extends Application implements ReactApplication {
14 |
15 | private final ReactNativeHost reactNativeHost = new ReactNativeHost(this) {
16 | @Override
17 | protected boolean getUseDeveloperSupport() {
18 | return BuildConfig.DEBUG;
19 | }
20 |
21 | @Override
22 | protected List getPackages() {
23 | return Collections.singletonList(new MainReactPackage());
24 | }
25 | };
26 |
27 | @Override
28 | public ReactNativeHost getReactNativeHost() {
29 | return reactNativeHost;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/layout/activity_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Application/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Application/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Application/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Application/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Application/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MyApplication
3 | AppActivity
4 |
5 |
--------------------------------------------------------------------------------
/Application/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Application/app/src/test/java/me/com/myapplication/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.com.myapplication;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Application/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/Application/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
--------------------------------------------------------------------------------
/Application/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/Application/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Application/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Aug 26 13:13:37 CEST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/Application/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/Application/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/Application/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The repo is **archived**!
2 |
3 | # This is a spike UNMAINTAINED
4 |
5 | ## Objective
6 |
7 | The objective is to add react-native dependencies to a vanilla Android app. This goal being to use react-native without commiting entirely to the platform.
8 |
9 | Benefits are :
10 | - Keep an exiting app setup, i.e. do not plainly move and commit to the platform.
11 | - Use the power of react-native :
12 | - To handover certain apsect of an app to non-android developerse (sign in / up for instance)
13 | - To prototype quickly.
14 |
15 | ## Approach
16 |
17 | Reac-native is a plaform and one may not want to move an entire app to it.
18 |
19 | Good reasons are :
20 | - It has impact on the file structure, and on the IDE integration
21 | - The plaform is still immature
22 |
23 | However, react-native is promissing and can already used to prototype or could even be used to integrate modules.
24 |
25 | ## Pitfals
26 |
27 | ### Min SDK
28 |
29 | it has to be >= 16.
30 |
31 | ### Depdency
32 |
33 | React-native require your applicattion to implement the `ReactApplication` interface to run. This means that the app needs to add a dependency to 'com.facebook.react:react-native`.
34 |
35 | The latter is a npm dependency so to work well outside of a react naive project (a project initialized with react-nmatie init and containing a folder `node_modules`) it has to be deployed to a maven repository.
36 |
37 | Including this has an overhead in size :
38 | - 1.5M normal.apk
39 | - 8.5M react_native.apk
40 | - 7.9M react_native.apk proguarded
41 |
42 | There is not much we can do about that since about 6M comes from react-native ndk libraries (compiled for arm64-v8a, armeabi, armeabi-v7a x86 , x86_64).
43 |
44 | It has also an overhead in method count (w/o running proguard) :
45 | - 21113 normal.apk, cf [dex count](notes/normal_apk_de_count.txt)
46 | - 36622 react_native.apk, cf [dex count](notes/react_native_apk_de_count.txt)
47 | - 22268 react_native.apk proguarded, cf [dex count](notes/react_native_proguarded_apk_de_count.txt)
48 |
49 | ### Packaging
50 |
51 | A little customization has been required to package the aar library (but not too bad).
52 |
53 | ```
54 | apply plugin: "com.android.library"
55 |
56 | project.ext.react = [
57 | bundleInDebug : true,
58 | jsBundleDirDebug: "$buildDir/intermediates/bundles/debug/assets",
59 | jsBundleDirRelease: "$buildDir/intermediates/bundles/release/assets"
60 | ]
61 | ```
62 |
63 | ### Alternative integrations
64 |
65 | If the footpint is a concernt, an other alternative would be to constraint react-native to protoyping and in a specific flavor and therefore has no impact on production app.
66 |
67 | ### Open questions
68 |
69 | - crash reporting ?
70 |
--------------------------------------------------------------------------------
/lib/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/lib/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*[.]android.js
5 |
6 | # Ignore templates with `@flow` in header
7 | .*/local-cli/generator.*
8 |
9 | # Ignore malformed json
10 | .*/node_modules/y18n/test/.*\.json
11 |
12 | # Ignore the website subdir
13 | /website/.*
14 |
15 | # Ignore BUCK generated dirs
16 | /\.buckd/
17 |
18 | # Ignore unexpected extra @providesModule
19 | .*/node_modules/commoner/test/source/widget/share.js
20 |
21 | # Ignore duplicate module providers
22 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
23 | .*/Libraries/react-native/React.js
24 | .*/Libraries/react-native/ReactNative.js
25 | .*/node_modules/jest-runtime/build/__tests__/.*
26 |
27 | [include]
28 |
29 | [libs]
30 | node_modules/react-native/Libraries/react-native/react-native-interface.js
31 | node_modules/react-native/flow
32 | flow/
33 |
34 | [options]
35 | module.system=haste
36 |
37 | esproposal.class_static_fields=enable
38 | esproposal.class_instance_fields=enable
39 |
40 | experimental.strict_type_args=true
41 |
42 | munge_underscores=true
43 |
44 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
45 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
46 |
47 | suppress_type=$FlowIssue
48 | suppress_type=$FlowFixMe
49 | suppress_type=$FixMe
50 |
51 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
53 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
54 |
55 | unsafe.enable_getters_and_setters=true
56 |
57 | [version]
58 | ^0.30.0
59 |
--------------------------------------------------------------------------------
/lib/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
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 | project.xcworkspace
24 |
25 | # Android/IJ
26 | #
27 | *.iml
28 | .idea
29 | .gradle
30 | local.properties
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 |
37 | # BUCK
38 | buck-out/
39 | \.buckd/
40 | android/app/libs
41 | android/keystores/debug.keystore
42 |
--------------------------------------------------------------------------------
/lib/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lib/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/lib/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/lib/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/lib/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/lib/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/lib/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/lib/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/lib/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/lib/android/lib/BUCK:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | # To learn about Buck see [Docs](https://buckbuild.com/).
4 | # To run your application with Buck:
5 | # - install Buck
6 | # - `npm start` - to start the packager
7 | # - `cd android`
8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10 | # - `buck install -r android/app` - compile, install and run application
11 | #
12 |
13 | lib_deps = []
14 | for jarfile in glob(['libs/*.jar']):
15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16 | lib_deps.append(':' + name)
17 | prebuilt_jar(
18 | name = name,
19 | binary_jar = jarfile,
20 | )
21 |
22 | for aarfile in glob(['libs/*.aar']):
23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24 | lib_deps.append(':' + name)
25 | android_prebuilt_aar(
26 | name = name,
27 | aar = aarfile,
28 | )
29 |
30 | android_library(
31 | name = 'all-libs',
32 | exported_deps = lib_deps
33 | )
34 |
35 | android_library(
36 | name = 'app-code',
37 | srcs = glob([
38 | 'src/main/java/**/*.java',
39 | ]),
40 | deps = [
41 | ':all-libs',
42 | ':build_config',
43 | ':res',
44 | ],
45 | )
46 |
47 | android_build_config(
48 | name = 'build_config',
49 | package = 'com.lib',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.lib',
56 | )
57 |
58 | android_binary(
59 | name = 'app',
60 | package_type = 'debug',
61 | manifest = 'src/main/AndroidManifest.xml',
62 | keystore = '//android/keystores:debug',
63 | deps = [
64 | ':app-code',
65 | ],
66 | )
67 |
--------------------------------------------------------------------------------
/lib/android/lib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.library"
2 |
3 | project.ext.react = [
4 | bundleInDebug : true,
5 | jsBundleDirDebug: "$buildDir/intermediates/bundles/debug/assets",
6 | jsBundleDirRelease: "$buildDir/intermediates/bundles/release/assets"
7 | ]
8 |
9 |
10 | apply from: "../../node_modules/react-native/react.gradle"
11 | apply plugin: 'maven-publish'
12 |
13 | /**
14 | * Set this to true to create two separate APKs instead of one:
15 | * - An APK that only works on ARM devices
16 | * - An APK that only works on x86 devices
17 | * The advantage is the size of the APK is reduced by about 4MB.
18 | * Upload all the APKs to the Play Store and people will download
19 | * the correct one based on the CPU architecture of their device.
20 | */
21 | def enableSeparateBuildPerCPUArchitecture = false
22 |
23 | /**
24 | * Run Proguard to shrink the Java bytecode in release builds.
25 | */
26 | def enableProguardInReleaseBuilds = false
27 |
28 | android {
29 | compileSdkVersion 23
30 | buildToolsVersion "23.0.1"
31 |
32 | defaultConfig {
33 | minSdkVersion 16
34 | targetSdkVersion 22
35 | versionCode 1
36 | versionName "1.0"
37 | ndk {
38 | abiFilters "armeabi-v7a", "x86"
39 | }
40 | }
41 | splits {
42 | abi {
43 | reset()
44 | enable enableSeparateBuildPerCPUArchitecture
45 | universalApk false // If true, also generate a universal APK
46 | include "armeabi-v7a", "x86"
47 | }
48 | }
49 | }
50 |
51 | dependencies {
52 | compile "com.android.support:appcompat-v7:23.0.1"
53 | compile "com.facebook.react:react-native:+" // From node_modules
54 | }
55 |
56 | task sourceJar(type: Jar) {
57 | from android.sourceSets.main.java.srcDirs
58 | classifier "source"
59 | }
60 |
61 | publishing {
62 | publications {
63 | bar(MavenPublication) {
64 | groupId 'com.lib'
65 | artifactId 'ReactNativeTestLib'
66 | version '0.1'
67 | artifact(sourceJar)
68 | artifact("$buildDir/outputs/aar/lib-debug.aar")
69 | }
70 | }
71 | repositories {
72 | mavenLocal()
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/android/lib/proguard-rules.pro:
--------------------------------------------------------------------------------
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:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/lib/android/lib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/lib/android/lib/src/main/java/com/lib/LibActivity.java:
--------------------------------------------------------------------------------
1 | package com.lib;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class LibActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "lib";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/lib/android/lib/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/lib/android/lib/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/lib/android/lib/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glung/react-native-as-an-android-lib/4e37eab5cdafb1bbe39b0dafeb268b6d4c3073bc/lib/android/lib/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | lib
3 |
4 |
--------------------------------------------------------------------------------
/lib/android/lib/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'lib'
2 |
3 | include ':lib'
4 |
--------------------------------------------------------------------------------
/lib/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | class lib extends Component {
16 | render() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.android.js
24 |
25 |
26 | Double tap R on your keyboard to reload,{'\n'}
27 | Shake or press menu button for dev menu
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | justifyContent: 'center',
38 | alignItems: 'center',
39 | backgroundColor: '#F5FCFF',
40 | },
41 | welcome: {
42 | fontSize: 40,
43 | textAlign: 'center',
44 | color: '#ff5500',
45 | margin: 10,
46 | },
47 | instructions: {
48 | textAlign: 'center',
49 | color: '#333333',
50 | marginBottom: 5,
51 | },
52 | });
53 |
54 | AppRegistry.registerComponent('lib', () => lib);
55 |
--------------------------------------------------------------------------------
/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lib",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start"
7 | },
8 | "dependencies": {
9 | "react": "15.3.1",
10 | "react-native": "0.32.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/notes/normal_apk_de_count.txt:
--------------------------------------------------------------------------------
1 | Processing normal.apk
2 | Read in 21113 method IDs.
3 | : 21113
4 | : 2
5 | android: 20685
6 | accessibilityservice: 6
7 | animation: 36
8 | app: 202
9 | content: 248
10 | pm: 22
11 | res: 96
12 | database: 30
13 | graphics: 282
14 | drawable: 103
15 | shapes: 2
16 | pdf: 3
17 | hardware: 14
18 | display: 3
19 | fingerprint: 11
20 | location: 5
21 | media: 186
22 | browse: 18
23 | session: 91
24 | net: 34
25 | os: 169
26 | print: 32
27 | pdf: 5
28 | provider: 9
29 | service: 10
30 | media: 10
31 | speech: 6
32 | tts: 6
33 | support: 17833
34 | annotation: 23
35 | design: 1797
36 | internal: 187
37 | widget: 1595
38 | graphics: 303
39 | drawable: 303
40 | animated: 1
41 | v4: 9508
42 | accessibilityservice: 41
43 | animation: 62
44 | app: 1742
45 | content: 339
46 | pm: 1
47 | res: 56
48 | database: 3
49 | graphics: 316
50 | drawable: 261
51 | hardware: 85
52 | display: 19
53 | fingerprint: 66
54 | internal: 74
55 | view: 74
56 | media: 1547
57 | session: 886
58 | net: 96
59 | os: 76
60 | print: 97
61 | provider: 96
62 | speech: 14
63 | tts: 14
64 | text: 103
65 | util: 283
66 | view: 3084
67 | accessibility: 1163
68 | animation: 29
69 | widget: 1449
70 | v7: 6202
71 | app: 974
72 | appcompat: 15
73 | content: 26
74 | res: 26
75 | graphics: 69
76 | drawable: 69
77 | recyclerview: 7
78 | text: 3
79 | transition: 2
80 | util: 140
81 | view: 846
82 | menu: 689
83 | widget: 4120
84 | helper: 150
85 | util: 5
86 | text: 43
87 | method: 3
88 | style: 2
89 | transition: 17
90 | util: 58
91 | view: 902
92 | accessibility: 220
93 | animation: 34
94 | inputmethod: 2
95 | webkit: 3
96 | widget: 560
97 | java: 391
98 | io: 45
99 | lang: 190
100 | ref: 2
101 | reflect: 17
102 | math: 1
103 | net: 3
104 | nio: 1
105 | text: 2
106 | util: 149
107 | concurrent: 27
108 | atomic: 7
109 | me: 21
110 | com: 21
111 | myapplication: 21
112 | org: 14
113 | xmlpull: 14
114 | v1: 14
115 | Overall method count: 21113
116 |
--------------------------------------------------------------------------------
/notes/react_native_apk_de_count.txt:
--------------------------------------------------------------------------------
1 | Processing ./app/build/outputs/apk/app-debug.apk
2 | Read in 36622 method IDs.
3 | : 36622
4 | : 4
5 | android: 21132
6 | accessibilityservice: 6
7 | animation: 38
8 | app: 240
9 | content: 279
10 | pm: 23
11 | res: 105
12 | database: 47
13 | sqlite: 15
14 | graphics: 342
15 | drawable: 112
16 | shapes: 2
17 | pdf: 3
18 | hardware: 17
19 | display: 3
20 | fingerprint: 11
21 | location: 12
22 | media: 195
23 | browse: 18
24 | session: 91
25 | net: 43
26 | os: 195
27 | preference: 3
28 | print: 32
29 | pdf: 5
30 | provider: 12
31 | service: 10
32 | media: 10
33 | speech: 6
34 | tts: 6
35 | support: 17838
36 | annotation: 23
37 | design: 1797
38 | internal: 187
39 | widget: 1595
40 | graphics: 303
41 | drawable: 303
42 | animated: 1
43 | v4: 9510
44 | accessibilityservice: 41
45 | animation: 62
46 | app: 1742
47 | content: 339
48 | pm: 1
49 | res: 56
50 | database: 3
51 | graphics: 316
52 | drawable: 261
53 | hardware: 85
54 | display: 19
55 | fingerprint: 66
56 | internal: 74
57 | view: 74
58 | media: 1547
59 | session: 886
60 | net: 96
61 | os: 76
62 | print: 97
63 | provider: 96
64 | speech: 14
65 | tts: 14
66 | text: 103
67 | util: 283
68 | view: 3085
69 | accessibility: 1163
70 | animation: 29
71 | widget: 1450
72 | v7: 6205
73 | app: 974
74 | appcompat: 15
75 | content: 26
76 | res: 26
77 | graphics: 69
78 | drawable: 69
79 | recyclerview: 7
80 | text: 3
81 | transition: 2
82 | util: 140
83 | view: 846
84 | menu: 689
85 | widget: 4123
86 | helper: 150
87 | util: 5
88 | system: 2
89 | text: 89
90 | format: 1
91 | method: 9
92 | style: 10
93 | transition: 19
94 | util: 74
95 | view: 938
96 | accessibility: 221
97 | animation: 37
98 | inputmethod: 2
99 | webkit: 48
100 | widget: 647
101 | bolts: 178
102 | com: 11501
103 | android: 1
104 | internal: 1
105 | util: 1
106 | facebook: 9211
107 | binaryresource: 15
108 | cache: 287
109 | common: 64
110 | disk: 223
111 | common: 569
112 | activitylistener: 25
113 | disk: 9
114 | executors: 79
115 | file: 19
116 | internal: 121
117 | logging: 121
118 | media: 7
119 | memory: 15
120 | references: 40
121 | soloader: 10
122 | statfs: 16
123 | streams: 14
124 | time: 16
125 | util: 61
126 | webp: 16
127 | csslayout: 418
128 | datasource: 134
129 | drawable: 1
130 | base: 1
131 | drawee: 886
132 | backends: 57
133 | pipeline: 57
134 | components: 27
135 | controller: 132
136 | drawable: 354
137 | generic: 171
138 | gestures: 8
139 | interfaces: 18
140 | view: 113
141 | fbcore: 1
142 | imageformat: 28
143 | imagepipeline: 1764
144 | animated: 8
145 | factory: 8
146 | backends: 25
147 | okhttp3: 25
148 | bitmaps: 16
149 | cache: 204
150 | common: 36
151 | core: 251
152 | datasource: 68
153 | decoder: 29
154 | image: 65
155 | listener: 46
156 | memory: 295
157 | nativecode: 25
158 | platform: 36
159 | producers: 584
160 | request: 75
161 | imagepipelinebase: 1
162 | imageutils: 26
163 | infer: 17
164 | annotation: 17
165 | jni: 25
166 | perftest: 2
167 | quicklog: 21
168 | identifiers: 3
169 | react: 4845
170 | animated: 100
171 | animation: 62
172 | bridge: 608
173 | queue: 74
174 | common: 57
175 | build: 1
176 | futures: 11
177 | network: 2
178 | cxxbridge: 195
179 | devsupport: 396
180 | modules: 736
181 | appstate: 10
182 | camera: 81
183 | clipboard: 6
184 | common: 3
185 | core: 84
186 | datepicker: 33
187 | debug: 42
188 | dialog: 44
189 | fresco: 23
190 | i18nmanager: 12
191 | image: 18
192 | intent: 7
193 | location: 43
194 | netinfo: 21
195 | network: 135
196 | permissions: 10
197 | share: 5
198 | statusbar: 18
199 | storage: 64
200 | systeminfo: 7
201 | timepicker: 33
202 | toast: 12
203 | vibration: 6
204 | websocket: 19
205 | shell: 4
206 | touch: 8
207 | uimanager: 843
208 | annotations: 11
209 | debug: 11
210 | events: 93
211 | layoutanimation: 66
212 | views: 1586
213 | art: 86
214 | drawer: 63
215 | events: 24
216 | image: 76
217 | imagehelper: 21
218 | modal: 72
219 | picker: 74
220 | events: 5
221 | progressbar: 36
222 | recyclerview: 101
223 | scroll: 155
224 | slider: 56
225 | swiperefresh: 33
226 | switchview: 36
227 | text: 159
228 | frescosupport: 20
229 | textfrescosupport: 11
230 | textinput: 226
231 | toolbar: 99
232 | events: 6
233 | view: 141
234 | viewpager: 75
235 | webview: 66
236 | events: 18
237 | soloader: 132
238 | systrace: 39
239 | fasterxml: 1553
240 | jackson: 1553
241 | core: 1553
242 | base: 164
243 | format: 34
244 | io: 156
245 | json: 399
246 | sym: 96
247 | type: 25
248 | util: 263
249 | lib: 20
250 | nineoldandroids: 716
251 | animation: 427
252 | util: 22
253 | view: 267
254 | animation: 38
255 | java: 1115
256 | io: 147
257 | lang: 363
258 | ref: 6
259 | reflect: 32
260 | math: 20
261 | net: 123
262 | nio: 26
263 | channels: 7
264 | charset: 3
265 | file: 2
266 | security: 22
267 | cert: 14
268 | text: 10
269 | util: 404
270 | concurrent: 107
271 | atomic: 19
272 | locks: 8
273 | logging: 4
274 | regex: 12
275 | zip: 33
276 | javax: 60
277 | annotation: 31
278 | concurrent: 1
279 | meta: 8
280 | net: 28
281 | ssl: 26
282 | security: 1
283 | auth: 1
284 | x500: 1
285 | me: 32
286 | com: 32
287 | myapplication: 32
288 | okhttp3: 2013
289 | internal: 1223
290 | cache: 139
291 | connection: 64
292 | framed: 427
293 | http: 144
294 | huc: 204
295 | io: 18
296 | platform: 53
297 | tls: 33
298 | ws: 79
299 | ws: 22
300 | okio: 559
301 | org: 28
302 | json: 13
303 | webkit: 1
304 | android_jsc: 1
305 | xmlpull: 14
306 | v1: 14
307 | Overall method count: 36622
308 |
--------------------------------------------------------------------------------
/notes/react_native_proguarded_apk_de_count.txt:
--------------------------------------------------------------------------------
1 | Processing ./app/build/outputs/apk/app-release-unsigned.apk
2 | Read in 22268 method IDs.
3 | : 22268
4 | : 3
5 | android: 11580
6 | animation: 28
7 | app: 76
8 | content: 189
9 | pm: 13
10 | res: 87
11 | database: 41
12 | sqlite: 15
13 | graphics: 284
14 | drawable: 103
15 | shapes: 2
16 | location: 12
17 | media: 10
18 | net: 26
19 | os: 115
20 | provider: 3
21 | support: 9486
22 | design: 950
23 | internal: 59
24 | widget: 890
25 | graphics: 251
26 | drawable: 251
27 | v4: 3580
28 | animation: 7
29 | app: 608
30 | content: 59
31 | res: 27
32 | graphics: 207
33 | drawable: 202
34 | internal: 74
35 | view: 74
36 | net: 14
37 | os: 18
38 | text: 27
39 | util: 199
40 | view: 1457
41 | accessibility: 365
42 | animation: 11
43 | widget: 910
44 | v7: 4705
45 | app: 530
46 | appcompat: 1
47 | content: 18
48 | res: 18
49 | graphics: 38
50 | drawable: 38
51 | recyclerview: 1
52 | text: 3
53 | transition: 1
54 | view: 784
55 | menu: 632
56 | widget: 3329
57 | system: 2
58 | text: 72
59 | format: 1
60 | method: 6
61 | style: 10
62 | transition: 17
63 | util: 70
64 | view: 613
65 | accessibility: 72
66 | animation: 32
67 | inputmethod: 2
68 | webkit: 47
69 | widget: 489
70 | bolts: 83
71 | com: 7215
72 | android: 1
73 | internal: 1
74 | util: 1
75 | facebook: 7212
76 | binaryresource: 9
77 | cache: 210
78 | common: 45
79 | disk: 165
80 | common: 312
81 | disk: 5
82 | executors: 55
83 | file: 16
84 | internal: 51
85 | logging: 59
86 | media: 4
87 | memory: 5
88 | references: 36
89 | soloader: 6
90 | statfs: 15
91 | streams: 14
92 | time: 13
93 | util: 22
94 | webp: 11
95 | csslayout: 135
96 | datasource: 122
97 | drawable: 1
98 | base: 1
99 | drawee: 641
100 | backends: 43
101 | pipeline: 43
102 | components: 25
103 | controller: 109
104 | drawable: 271
105 | generic: 98
106 | gestures: 8
107 | interfaces: 16
108 | view: 71
109 | imageformat: 22
110 | imagepipeline: 1475
111 | animated: 7
112 | factory: 7
113 | backends: 23
114 | okhttp3: 23
115 | bitmaps: 15
116 | cache: 164
117 | common: 28
118 | core: 179
119 | datasource: 27
120 | decoder: 26
121 | image: 60
122 | listener: 22
123 | memory: 247
124 | nativecode: 21
125 | platform: 36
126 | producers: 559
127 | request: 61
128 | imageutils: 21
129 | infer: 5
130 | annotation: 5
131 | jni: 22
132 | react: 4106
133 | animated: 100
134 | animation: 11
135 | bridge: 473
136 | queue: 67
137 | common: 40
138 | futures: 10
139 | network: 1
140 | cxxbridge: 139
141 | devsupport: 77
142 | modules: 716
143 | appstate: 10
144 | camera: 81
145 | clipboard: 6
146 | core: 84
147 | datepicker: 32
148 | debug: 35
149 | dialog: 44
150 | fresco: 23
151 | i18nmanager: 12
152 | image: 18
153 | intent: 7
154 | location: 43
155 | netinfo: 21
156 | network: 132
157 | permissions: 10
158 | share: 5
159 | statusbar: 18
160 | storage: 60
161 | systeminfo: 6
162 | timepicker: 32
163 | toast: 12
164 | vibration: 6
165 | websocket: 19
166 | shell: 4
167 | touch: 8
168 | uimanager: 803
169 | annotations: 11
170 | debug: 11
171 | events: 91
172 | layoutanimation: 66
173 | views: 1544
174 | art: 85
175 | drawer: 63
176 | events: 24
177 | image: 74
178 | imagehelper: 20
179 | modal: 71
180 | picker: 70
181 | events: 5
182 | progressbar: 36
183 | recyclerview: 89
184 | scroll: 150
185 | slider: 56
186 | swiperefresh: 33
187 | switchview: 36
188 | text: 153
189 | frescosupport: 20
190 | textfrescosupport: 10
191 | textinput: 226
192 | toolbar: 98
193 | events: 6
194 | view: 136
195 | viewpager: 73
196 | webview: 65
197 | events: 18
198 | soloader: 104
199 | systrace: 27
200 | lib: 2
201 | java: 926
202 | io: 116
203 | lang: 296
204 | ref: 6
205 | reflect: 27
206 | math: 1
207 | net: 117
208 | nio: 20
209 | channels: 7
210 | charset: 3
211 | security: 22
212 | cert: 14
213 | text: 8
214 | util: 346
215 | concurrent: 81
216 | atomic: 13
217 | locks: 4
218 | logging: 4
219 | regex: 10
220 | zip: 31
221 | javax: 29
222 | net: 28
223 | ssl: 26
224 | security: 1
225 | auth: 1
226 | x500: 1
227 | me: 14
228 | com: 14
229 | myapplication: 14
230 | okhttp3: 2013
231 | internal: 1223
232 | cache: 139
233 | connection: 64
234 | framed: 427
235 | http: 144
236 | huc: 204
237 | io: 18
238 | platform: 53
239 | tls: 33
240 | ws: 79
241 | ws: 22
242 | okio: 385
243 | org: 20
244 | json: 6
245 | xmlpull: 14
246 | v1: 14
247 | Overall method count: 22268
248 |
--------------------------------------------------------------------------------