@ua/react-native-airship 20.0.1 → 20.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -24,47 +24,6 @@ def isHmsEnabled() {
|
|
|
24
24
|
return (rootProject.hasProperty("airshipHmsEnabled") && rootProject.getProperty("airshipHmsEnabled") == "true") || (rootProject.ext.has("airshipHmsEnabled") && rootProject.ext.get("airshipHmsEnabled") == "true")
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
def resolveReactNativeDirectory() {
|
|
28
|
-
def reactNativeLocation = rootProject.hasProperty("reactNativeDir") ? rootProject.getProperty("reactNativeDir") : null
|
|
29
|
-
|
|
30
|
-
if (reactNativeLocation != null) {
|
|
31
|
-
return file(reactNativeLocation)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
// Resolve React Native location with Node
|
|
36
|
-
// This will make sure that we get installation location correctly in monorepos
|
|
37
|
-
def reactNativePackageJsonPathStdout = new ByteArrayOutputStream()
|
|
38
|
-
|
|
39
|
-
exec {
|
|
40
|
-
commandLine("node", "-p", "require.resolve('react-native/package.json')")
|
|
41
|
-
ignoreExitValue true
|
|
42
|
-
standardOutput = reactNativePackageJsonPathStdout
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
def reactNativeFromProjectNodeModules = file(reactNativePackageJsonPathStdout.toString().trim()).getParentFile();
|
|
46
|
-
|
|
47
|
-
if (reactNativeFromProjectNodeModules.exists()) {
|
|
48
|
-
return reactNativeFromProjectNodeModules
|
|
49
|
-
}
|
|
50
|
-
} catch (e) {
|
|
51
|
-
// Ignore
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
throw new Exception(
|
|
55
|
-
"react-native-airship: Failed to resolve 'react-native' in the project. " +
|
|
56
|
-
"If you have a non-standard project structure, you can specify 'reactNativeDir' with the path to 'react-native' in your 'gradle.properties' file."
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def reactNativeRootDir = resolveReactNativeDirectory()
|
|
62
|
-
def reactProperties = new Properties()
|
|
63
|
-
file("$reactNativeRootDir/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) }
|
|
64
|
-
|
|
65
|
-
def reactNativeVersion = reactProperties.getProperty("VERSION_NAME")
|
|
66
|
-
def (reactNativeMajorVersion, reactNativeMinorVersion) = reactNativeVersion.split("\\.").collect { it.isInteger() ? it.toInteger() : it }
|
|
67
|
-
|
|
68
27
|
|
|
69
28
|
apply plugin: "com.android.library"
|
|
70
29
|
apply plugin: "kotlin-android"
|
|
@@ -81,6 +40,7 @@ def getExtOrIntegerDefault(name) {
|
|
|
81
40
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Airship_" + name]).toInteger()
|
|
82
41
|
}
|
|
83
42
|
|
|
43
|
+
|
|
84
44
|
android {
|
|
85
45
|
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
86
46
|
|
|
@@ -142,14 +102,12 @@ def proxy_version = getExtOrDefault("airshipProxyVersion")
|
|
|
142
102
|
def airship_version = getExtOrDefault("airshipVersion")
|
|
143
103
|
|
|
144
104
|
dependencies {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
implementation "com.facebook.react:react-android"
|
|
150
|
-
}
|
|
151
|
-
|
|
105
|
+
// For < 0.71, this will be from the local maven repo
|
|
106
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
107
|
+
//noinspection GradleDynamicVersion
|
|
108
|
+
implementation "com.facebook.react:react-native:+"
|
|
152
109
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
110
|
+
|
|
153
111
|
api "com.urbanairship.android:airship-framework-proxy:$proxy_version"
|
|
154
112
|
|
|
155
113
|
if (isHmsEnabled()) {
|
package/package.json
CHANGED