@appboxo/react-native-sdk 1.0.31 → 1.0.32
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
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
// android/build.gradle
|
|
2
|
-
|
|
3
|
-
// based on:
|
|
4
|
-
//
|
|
5
|
-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
|
|
6
|
-
// original location:
|
|
7
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
|
|
8
|
-
//
|
|
9
|
-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
|
|
10
|
-
// original location:
|
|
11
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
|
|
12
|
-
|
|
13
1
|
def DEFAULT_COMPILE_SDK_VERSION = 30
|
|
14
2
|
def DEFAULT_MIN_SDK_VERSION = 21
|
|
15
3
|
def DEFAULT_TARGET_SDK_VERSION = 30
|
|
@@ -18,27 +6,17 @@ def safeExtGet(prop, fallback) {
|
|
|
18
6
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
19
7
|
}
|
|
20
8
|
|
|
21
|
-
apply plugin: 'com.android.library'
|
|
22
|
-
apply plugin: 'maven'
|
|
23
|
-
|
|
24
9
|
buildscript {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
google()
|
|
32
|
-
jcenter()
|
|
33
|
-
}
|
|
34
|
-
dependencies {
|
|
35
|
-
classpath 'com.android.tools.build:gradle:4.1.3'
|
|
36
|
-
}
|
|
10
|
+
repositories {
|
|
11
|
+
google()
|
|
12
|
+
jcenter()
|
|
13
|
+
}
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath 'com.android.tools.build:gradle:7.1.3'
|
|
37
16
|
}
|
|
38
17
|
}
|
|
39
18
|
|
|
40
19
|
apply plugin: 'com.android.library'
|
|
41
|
-
apply plugin: 'maven'
|
|
42
20
|
|
|
43
21
|
android {
|
|
44
22
|
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
|
@@ -49,23 +27,88 @@ android {
|
|
|
49
27
|
versionCode 1
|
|
50
28
|
versionName "1.0"
|
|
51
29
|
}
|
|
30
|
+
buildTypes {
|
|
31
|
+
release {
|
|
32
|
+
minifyEnabled false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
52
35
|
lintOptions {
|
|
53
|
-
|
|
36
|
+
disable 'GradleCompatible'
|
|
37
|
+
}
|
|
38
|
+
compileOptions {
|
|
39
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
40
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
54
41
|
}
|
|
55
42
|
}
|
|
56
43
|
|
|
57
44
|
repositories {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
mavenCentral()
|
|
46
|
+
jcenter()
|
|
47
|
+
google()
|
|
48
|
+
|
|
49
|
+
def found = false
|
|
50
|
+
def defaultDir = null
|
|
51
|
+
def androidSourcesName = 'React Native sources'
|
|
52
|
+
|
|
53
|
+
if (rootProject.ext.has('reactNativeAndroidRoot')) {
|
|
54
|
+
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
|
|
55
|
+
} else {
|
|
56
|
+
defaultDir = new File(
|
|
57
|
+
projectDir,
|
|
58
|
+
'/../../../node_modules/react-native/android'
|
|
59
|
+
)
|
|
62
60
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
|
|
62
|
+
if (defaultDir.exists()) {
|
|
63
|
+
maven {
|
|
64
|
+
url defaultDir.toString()
|
|
65
|
+
name androidSourcesName
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
|
|
69
|
+
found = true
|
|
70
|
+
} else {
|
|
71
|
+
def parentDir = rootProject.projectDir
|
|
72
|
+
|
|
73
|
+
1.upto(5, {
|
|
74
|
+
if (found) return true
|
|
75
|
+
parentDir = parentDir.parentFile
|
|
76
|
+
|
|
77
|
+
def androidSourcesDir = new File(
|
|
78
|
+
parentDir,
|
|
79
|
+
'node_modules/react-native'
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def androidPrebuiltBinaryDir = new File(
|
|
83
|
+
parentDir,
|
|
84
|
+
'node_modules/react-native/android'
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
if (androidPrebuiltBinaryDir.exists()) {
|
|
88
|
+
maven {
|
|
89
|
+
url androidPrebuiltBinaryDir.toString()
|
|
90
|
+
name androidSourcesName
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
|
|
94
|
+
found = true
|
|
95
|
+
} else if (androidSourcesDir.exists()) {
|
|
96
|
+
maven {
|
|
97
|
+
url androidSourcesDir.toString()
|
|
98
|
+
name androidSourcesName
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
|
|
102
|
+
found = true
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
if (!found) {
|
|
107
|
+
throw new GradleException(
|
|
108
|
+
"${project.name}: unable to locate React Native android sources. " +
|
|
109
|
+
"Ensure you have you installed React Native as a dependency in your project and try again."
|
|
110
|
+
)
|
|
66
111
|
}
|
|
67
|
-
google()
|
|
68
|
-
jcenter()
|
|
69
112
|
}
|
|
70
113
|
|
|
71
114
|
rootProject.allprojects {
|
|
@@ -85,77 +128,4 @@ dependencies {
|
|
|
85
128
|
//noinspection GradleDynamicVersion
|
|
86
129
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
87
130
|
implementation 'com.appboxo:miniapp-sdk:1.4.13'
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
def configureReactNativePom(def pom) {
|
|
91
|
-
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
|
|
92
|
-
|
|
93
|
-
pom.project {
|
|
94
|
-
name packageJson.title
|
|
95
|
-
artifactId packageJson.name
|
|
96
|
-
version = packageJson.version
|
|
97
|
-
group = "com.reactlibrary"
|
|
98
|
-
description packageJson.description
|
|
99
|
-
url packageJson.repository.baseUrl
|
|
100
|
-
|
|
101
|
-
licenses {
|
|
102
|
-
license {
|
|
103
|
-
name packageJson.license
|
|
104
|
-
url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
|
|
105
|
-
distribution 'repo'
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
developers {
|
|
110
|
-
developer {
|
|
111
|
-
id packageJson.author.username
|
|
112
|
-
name packageJson.author.name
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
afterEvaluate { project ->
|
|
119
|
-
// some Gradle build hooks ref:
|
|
120
|
-
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
|
|
121
|
-
task androidJavadoc(type: Javadoc) {
|
|
122
|
-
source = android.sourceSets.main.java.srcDirs
|
|
123
|
-
classpath += files(android.bootClasspath)
|
|
124
|
-
classpath += files(project.getConfigurations().getByName('compile').asList())
|
|
125
|
-
include '**/*.java'
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
|
|
129
|
-
classifier = 'javadoc'
|
|
130
|
-
from androidJavadoc.destinationDir
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
task androidSourcesJar(type: Jar) {
|
|
134
|
-
classifier = 'sources'
|
|
135
|
-
from android.sourceSets.main.java.srcDirs
|
|
136
|
-
include '**/*.java'
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
android.libraryVariants.all { variant ->
|
|
140
|
-
def name = variant.name.capitalize()
|
|
141
|
-
def javaCompileTask = variant.javaCompileProvider.get()
|
|
142
|
-
|
|
143
|
-
task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
|
|
144
|
-
from javaCompileTask.destinationDir
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
artifacts {
|
|
149
|
-
archives androidSourcesJar
|
|
150
|
-
archives androidJavadocJar
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
task installArchives(type: Upload) {
|
|
154
|
-
configuration = configurations.archives
|
|
155
|
-
repositories.mavenDeployer {
|
|
156
|
-
// Deploy to react-native-event-bridge/maven, ready to publish to npm
|
|
157
|
-
repository url: "file://${projectDir}/../android/maven"
|
|
158
|
-
configureReactNativePom pom
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
131
|
+
}
|
|
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|
|
3
3
|
distributionPath=wrapper/dists
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
6
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
6
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## For more details on how to configure your build environment visit
|
|
2
|
+
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
3
|
+
#
|
|
4
|
+
# Specifies the JVM arguments used for the daemon process.
|
|
5
|
+
# The setting is particularly useful for tweaking memory settings.
|
|
6
|
+
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
|
7
|
+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
|
8
|
+
#
|
|
9
|
+
# When configured, Gradle will run in incubating parallel mode.
|
|
10
|
+
# This option should only be used with decoupled projects. More details, visit
|
|
11
|
+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
12
|
+
# org.gradle.parallel=true
|
|
13
|
+
#Tue May 17 10:42:25 KGT 2022
|
|
14
|
+
android.useAndroidX=true
|
|
15
|
+
android.enableJetifier=true
|
package/android/gradlew
CHANGED
|
File without changes
|