Skip to content

Commit 9265d9a

Browse files
authored
Rn61 (#573)
* WIP - migrate to rn61 - ios works * wip - make android build works * remove all pods from git * add ios/Pods to gitignore * fix android autolink * fix link of internal uilib components * fix rn61 accessibility issues * fix lint issues * install again react-native-blur * migrate native uilib to rn61 * move native dependencies to dev and peer * update interactable and blur native modules versions * change native lib package name to react-native-ui-lib-core * rename again uilib native package * move podspec file to root folder * create a link for podspec file * update uilib-native lib version * fix issue with accessibility action in Drawer component * update major version to 4.0.0
1 parent 1135fd5 commit 9265d9a

File tree

120 files changed

+3138
-284
lines changed

Some content is hidden

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

120 files changed

+3138
-284
lines changed

ReactNativeUiLib.podspec

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

ReactNativeUiLib.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/ReactNativeUiLib.podspec
File renamed without changes.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
apply plugin: "com.android.application"
2+
3+
project.ext.react = [
4+
entryFile: "index.js"
5+
]
6+
7+
//apply from: "../../node_modules/react-native/react.gradle"
8+
9+
10+
def enableSeparateBuildPerCPUArchitecture = false
11+
def enableProguardInReleaseBuilds = false
12+
13+
android {
14+
compileSdkVersion rootProject.ext.compileSdkVersion
15+
buildToolsVersion rootProject.ext.buildToolsVersion
16+
17+
compileOptions {
18+
sourceCompatibility JavaVersion.VERSION_1_8
19+
targetCompatibility JavaVersion.VERSION_1_8
20+
}
21+
22+
defaultConfig {
23+
applicationId "com.uilib"
24+
minSdkVersion rootProject.ext.minSdkVersion
25+
targetSdkVersion rootProject.ext.targetSdkVersion
26+
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57"
27+
versionCode 1
28+
versionName "1.0"
29+
ndk {
30+
abiFilters "armeabi-v7a", "x86"
31+
}
32+
}
33+
splits {
34+
abi {
35+
reset()
36+
enable enableSeparateBuildPerCPUArchitecture
37+
universalApk false // If true, also generate a universal APK
38+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
39+
}
40+
}
41+
buildTypes {
42+
release {
43+
minifyEnabled enableProguardInReleaseBuilds
44+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
45+
}
46+
}
47+
48+
49+
// applicationVariants are e.g. debug, release
50+
// applicationVariants.all { variant ->
51+
// variant.outputs.each { output ->
52+
// // For each separate APK per architecture, set a unique version code as described here:
53+
// // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
54+
// def versionCodes = ["armeabi-v7a":1, "x86":2]
55+
// def abi = output.getFilter(OutputFile.ABI)
56+
// if (abi != null) { // null for the universal-debug, universal-release variants
57+
// output.versionCodeOverride =
58+
// versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
59+
// }
60+
// }
61+
// }
62+
}
63+
64+
configurations.all {
65+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
66+
def requested = details.requested
67+
if (requested.group == 'com.android.support' && requested.name != 'multidex') {
68+
details.useVersion "${rootProject.ext.supportLibVersion}"
69+
}
70+
}
71+
}
72+
73+
dependencies {
74+
implementation project(':@react-native-community_async-storage')
75+
implementation fileTree(dir: "libs", include: ["*.jar"])
76+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
77+
implementation "com.facebook.react:react-native:+" // From node_modules
78+
implementation 'com.facebook.fresco:animated-gif:0.14.1'
79+
implementation project(':react-native-navigation')
80+
implementation project(':react-native-interactable')
81+
implementation project(':@react-native-community_blur')
82+
implementation project(':react-native-ui-lib')
83+
implementation project(':react-native-text-size')
84+
implementation project(':react-native-reanimated')
85+
implementation project(':react-native-gesture-handler')
86+
}
87+
88+
// Run this once to be able to run the application with BUCK
89+
// puts all compile dependencies into folder libs for BUCK to use
90+
task copyDownloadableDepsToLibs(type: Copy) {
91+
from configurations.compile
92+
into 'libs'
93+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Helper definitions to glob .aar and .jar targets"""
2+
3+
def create_aar_targets(aarfiles):
4+
for aarfile in aarfiles:
5+
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6+
lib_deps.append(":" + name)
7+
android_prebuilt_aar(
8+
name = name,
9+
aar = aarfile,
10+
)
11+
12+
def create_jar_targets(jarfiles):
13+
for jarfile in jarfiles:
14+
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15+
lib_deps.append(":" + name)
16+
prebuilt_jar(
17+
name = name,
18+
binary_jar = jarfile,
19+
)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 <methods>; }
47+
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
48+
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49+
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
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.**
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6+
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8+
</manifest>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.uilib"
3+
android:versionCode="1"
4+
android:versionName="1.0">
5+
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
8+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
9+
10+
<application
11+
android:name=".MainApplication"
12+
android:label="@string/app_name"
13+
android:icon="@mipmap/ic_launcher"
14+
android:allowBackup="false"
15+
android:theme="@style/AppTheme"
16+
android:supportsRtl="true">
17+
<activity
18+
android:name=".MainActivity"
19+
android:label="@string/app_name"
20+
android:screenOrientation="portrait"
21+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
22+
android:windowSoftInputMode="adjustResize">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
29+
</application>
30+
31+
</manifest>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">uilib</string>
3+
</resources>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="android:textColor">#000000</item>
7+
</style>
8+
9+
</resources>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
ext {
5+
buildToolsVersion = "28.0.3"
6+
minSdkVersion = 19
7+
compileSdkVersion = 28
8+
targetSdkVersion = 28
9+
supportLibVersion = "28.0.0"
10+
}
11+
repositories {
12+
google()
13+
jcenter()
14+
}
15+
dependencies {
16+
classpath 'com.android.tools.build:gradle:3.3.1'
17+
18+
// NOTE: Do not place your application dependencies here; they belong
19+
// in the individual module build.gradle files
20+
}
21+
}
22+
23+
allprojects {
24+
repositories {
25+
google()
26+
mavenCentral()
27+
mavenLocal()
28+
jcenter()
29+
maven {
30+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
31+
url "$rootDir/../node_modules/react-native/android"
32+
}
33+
maven { url 'https://jitpack.io' }
34+
}
35+
}
36+
37+
subprojects {
38+
afterEvaluate {project ->
39+
if (project.hasProperty("android")) {
40+
android {
41+
compileSdkVersion rootProject.ext.compileSdkVersion
42+
}
43+
}
44+
45+
if (project.hasProperty("defaultConfig")) {
46+
defaultConfig {
47+
minSdkVersion rootProject.ext.minSdkVersion
48+
targetSdkVersion rootProject.ext.targetSdkVersion
49+
}
50+
}
51+
}
52+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
# Disable incremental resource processing as it broke release build
22+
#android.enableAapt2=false
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Jan 03 12:09:08 IST 2019
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-4.10.2-all.zip

0 commit comments

Comments
 (0)