react-native-unistyles 2.0.0-beta.4 → 2.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,14 +6,10 @@ add_library(unistyles
6
6
  SHARED
7
7
  ../cxx/UnistylesRuntime.cpp
8
8
  ./src/main/cxx/cpp-adapter.cpp
9
- ../node_modules/react-native/ReactCommon/jsi/jsi/jsi.cpp
10
9
  )
11
10
 
12
11
  include_directories(
13
12
  ../cxx
14
- ../node_modules/react-native/React
15
- ../node_modules/react-native/React/Base
16
- ../node_modules/react-native/ReactCommon/jsi
17
13
  )
18
14
 
19
15
  set_target_properties(unistyles PROPERTIES
@@ -23,6 +19,9 @@ set_target_properties(unistyles PROPERTIES
23
19
  POSITION_INDEPENDENT_CODE ON
24
20
  )
25
21
 
22
+ find_package(ReactAndroid REQUIRED CONFIG)
23
+
26
24
  target_link_libraries(unistyles
25
+ ReactAndroid::jsi
27
26
  android
28
27
  )
@@ -15,12 +15,28 @@ buildscript {
15
15
  apply plugin: 'com.android.library'
16
16
  apply plugin: 'org.jetbrains.kotlin.android'
17
17
 
18
+ def resolveBuildType() {
19
+ Gradle gradle = getGradle()
20
+ String tskReqStr = gradle.getStartParameter().getTaskRequests()['args'].toString()
21
+
22
+ return tskReqStr.contains('Release') ? 'release' : 'debug'
23
+ }
24
+
18
25
  android {
19
26
  compileSdkVersion safeExtGet('compileSdkVersion', 33)
20
27
  namespace "com.unistyles"
21
28
 
22
29
  defaultConfig {
23
30
  minSdkVersion safeExtGet('minSdkVersion', 21)
31
+ externalNativeBuild {
32
+ cmake {
33
+ arguments "-DANDROID_STL=c++_shared"
34
+ }
35
+ }
36
+ }
37
+
38
+ buildFeatures {
39
+ prefab true
24
40
  }
25
41
 
26
42
  externalNativeBuild {
@@ -28,6 +44,16 @@ android {
28
44
  path "CMakeLists.txt"
29
45
  }
30
46
  }
47
+
48
+ packagingOptions {
49
+ doNotStrip resolveBuildType() == 'debug' ? "**/**/*.so" : ''
50
+ excludes = [
51
+ "META-INF",
52
+ "META-INF/**",
53
+ "**/libjsi.so",
54
+ "**/libc++_shared.so"
55
+ ]
56
+ }
31
57
  }
32
58
 
33
59
  repositories {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.5",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",