Skip to content

Commit

Permalink
[Android] Improve building. (software-mansion#900)
Browse files Browse the repository at this point in the history
WHY:
To speed up building.

HOW:
1 Added necessary tasks to Android/build.gradle similar to tasks from react-native/ReactAndroid/build.gradle.
2 Created Application.mk
3 Created Android.mk
4 Add important lines from ReactAndroid/src/main/jni/react/jni/Android.mk (I've tried to import/include this module but it didn't work)
5 update createNPMPackage.sh
  • Loading branch information
Szymon20000 authored Jun 24, 2020
1 parent 83590ce commit b472a65
Show file tree
Hide file tree
Showing 12 changed files with 1,030 additions and 629 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ project.xcworkspace
.idea
.gradle
local.properties
android/src/main/JNILibs/

# node.js
#
Expand Down
2 changes: 1 addition & 1 deletion Example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ dependencies {
implementation project(':react-native-gesture-handler')

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(':react-native')// From node_modules
implementation "com.facebook.react:react-native:+" // From node_modules
//implementation 'org.webkit:android-jsc:+'

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
Expand Down
8 changes: 0 additions & 8 deletions Example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ buildscript {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

configurations.all {
resolutionStrategy {
dependencySubstitution {
substitute module("com.facebook.react:react-native:+") with project(":react-native")
}
}
}
}

allprojects {
Expand Down
2 changes: 0 additions & 2 deletions Example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ include ':react-native-reanimated'
project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../../android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native'
project(':react-native').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
include ':app'
58 changes: 0 additions & 58 deletions Example/patches/react-native+0.62.2.patch

This file was deleted.

Loading

0 comments on commit b472a65

Please sign in to comment.