react-native-roxit-code-scanner 1.0.5 → 1.0.7
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 +26 -127
- package/android/build.gradle__ +138 -0
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,138 +1,37 @@
|
|
|
1
|
-
//buildscript {
|
|
2
|
-
// repositories {
|
|
3
|
-
// google()
|
|
4
|
-
// mavenCentral()
|
|
5
|
-
// }
|
|
6
|
-
//
|
|
7
|
-
// dependencies {
|
|
8
|
-
// classpath 'com.android.tools.build:gradle:3.5.3'
|
|
9
|
-
// }
|
|
10
|
-
//}
|
|
11
|
-
|
|
12
|
-
def isNewArchitectureEnabled() {
|
|
13
|
-
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
1
|
apply plugin: 'com.android.library'
|
|
17
2
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def getExtOrDefault(name) {
|
|
23
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RoxitCodeScanner_' + name]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
def getExtOrIntegerDefault(name) {
|
|
27
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['RoxitCodeScanner_' + name]).toInteger()
|
|
28
|
-
}
|
|
3
|
+
def DEFAULT_COMPILE_SDK_VERSION = 27
|
|
4
|
+
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
|
|
5
|
+
def DEFAULT_MIN_SDK_VERSION = 16
|
|
6
|
+
def DEFAULT_TARGET_SDK_VERSION = 27
|
|
29
7
|
|
|
30
8
|
android {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
9
|
+
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
|
|
10
|
+
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
|
|
11
|
+
|
|
12
|
+
defaultConfig {
|
|
13
|
+
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
|
|
14
|
+
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
|
|
15
|
+
versionCode 1
|
|
16
|
+
versionName "1.1"
|
|
17
|
+
}
|
|
18
|
+
lintOptions {
|
|
19
|
+
abortOnError false
|
|
41
20
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
lintOptions {
|
|
45
|
-
disable 'GradleCompatible'
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
compileOptions {
|
|
49
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
50
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
51
|
-
}
|
|
52
|
-
|
|
53
21
|
}
|
|
54
22
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// if (rootProject.ext.has('reactNativeAndroidRoot')) {
|
|
64
|
-
// defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
|
|
65
|
-
// } else {
|
|
66
|
-
// defaultDir = new File(
|
|
67
|
-
// projectDir,
|
|
68
|
-
// '/../../../node_modules/react-native/android'
|
|
69
|
-
// )
|
|
70
|
-
// }
|
|
71
|
-
//
|
|
72
|
-
// if (defaultDir.exists()) {
|
|
73
|
-
// maven {
|
|
74
|
-
// url defaultDir.toString()
|
|
75
|
-
// name androidSourcesName
|
|
76
|
-
// }
|
|
77
|
-
//
|
|
78
|
-
// logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
|
|
79
|
-
// found = true
|
|
80
|
-
// } else {
|
|
81
|
-
// def parentDir = rootProject.projectDir
|
|
82
|
-
//
|
|
83
|
-
// 1.upto(5, {
|
|
84
|
-
// if (found) return true
|
|
85
|
-
// parentDir = parentDir.parentFile
|
|
86
|
-
//
|
|
87
|
-
// def androidSourcesDir = new File(
|
|
88
|
-
// parentDir,
|
|
89
|
-
// 'node_modules/react-native'
|
|
90
|
-
// )
|
|
91
|
-
//
|
|
92
|
-
// def androidPrebuiltBinaryDir = new File(
|
|
93
|
-
// parentDir,
|
|
94
|
-
// 'node_modules/react-native/android'
|
|
95
|
-
// )
|
|
96
|
-
//
|
|
97
|
-
// if (androidPrebuiltBinaryDir.exists()) {
|
|
98
|
-
// maven {
|
|
99
|
-
// url androidPrebuiltBinaryDir.toString()
|
|
100
|
-
// name androidSourcesName
|
|
101
|
-
// }
|
|
102
|
-
//
|
|
103
|
-
// logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
|
|
104
|
-
// found = true
|
|
105
|
-
// } else if (androidSourcesDir.exists()) {
|
|
106
|
-
// maven {
|
|
107
|
-
// url androidSourcesDir.toString()
|
|
108
|
-
// name androidSourcesName
|
|
109
|
-
// }
|
|
110
|
-
//
|
|
111
|
-
// logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
|
|
112
|
-
// found = true
|
|
113
|
-
// }
|
|
114
|
-
// })
|
|
115
|
-
// }
|
|
116
|
-
//
|
|
117
|
-
// if (!found) {
|
|
118
|
-
// throw new GradleException(
|
|
119
|
-
// "${project.name}: unable to locate React Native android sources. " +
|
|
120
|
-
// "Ensure you have you installed React Native as a dependency in your project and try again."
|
|
121
|
-
// )
|
|
122
|
-
// }
|
|
123
|
-
//}
|
|
124
|
-
|
|
23
|
+
repositories {
|
|
24
|
+
mavenLocal()
|
|
25
|
+
jcenter()
|
|
26
|
+
maven {
|
|
27
|
+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
28
|
+
url "$projectDir/../../../node_modules/react-native/android"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
125
31
|
|
|
126
32
|
dependencies {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
33
|
+
implementation 'androidx.appcompat:appcompat:1.0.0'
|
|
34
|
+
implementation 'com.facebook.react:react-native:+'
|
|
35
|
+
implementation fileTree( dir: "libs", includes: ['*.jar'] )
|
|
130
36
|
}
|
|
131
37
|
|
|
132
|
-
if (isNewArchitectureEnabled()) {
|
|
133
|
-
react {
|
|
134
|
-
jsRootDir = file("../src/")
|
|
135
|
-
libraryName = "RoxitCodeScanner"
|
|
136
|
-
codegenJavaPackageName = "com.roxitcodescanner"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
//buildscript {
|
|
2
|
+
// repositories {
|
|
3
|
+
// google()
|
|
4
|
+
// mavenCentral()
|
|
5
|
+
// }
|
|
6
|
+
//
|
|
7
|
+
// dependencies {
|
|
8
|
+
// classpath 'com.android.tools.build:gradle:3.5.3'
|
|
9
|
+
// }
|
|
10
|
+
//}
|
|
11
|
+
|
|
12
|
+
//def isNewArchitectureEnabled() {
|
|
13
|
+
// return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
14
|
+
//}
|
|
15
|
+
|
|
16
|
+
apply plugin: 'com.android.library'
|
|
17
|
+
|
|
18
|
+
//if (isNewArchitectureEnabled()) {
|
|
19
|
+
// apply plugin: 'com.facebook.react'
|
|
20
|
+
//}
|
|
21
|
+
|
|
22
|
+
def getExtOrDefault(name) {
|
|
23
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RoxitCodeScanner_' + name]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def getExtOrIntegerDefault(name) {
|
|
27
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['RoxitCodeScanner_' + name]).toInteger()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
android {
|
|
31
|
+
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
32
|
+
|
|
33
|
+
defaultConfig {
|
|
34
|
+
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
35
|
+
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
36
|
+
//buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
37
|
+
}
|
|
38
|
+
buildTypes {
|
|
39
|
+
release {
|
|
40
|
+
minifyEnabled false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
lintOptions {
|
|
45
|
+
disable 'GradleCompatible'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
compileOptions {
|
|
49
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
50
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//repositories {
|
|
56
|
+
// mavenCentral()
|
|
57
|
+
// google()
|
|
58
|
+
//
|
|
59
|
+
// def found = false
|
|
60
|
+
// def defaultDir = null
|
|
61
|
+
// def androidSourcesName = 'React Native sources'
|
|
62
|
+
//
|
|
63
|
+
// if (rootProject.ext.has('reactNativeAndroidRoot')) {
|
|
64
|
+
// defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
|
|
65
|
+
// } else {
|
|
66
|
+
// defaultDir = new File(
|
|
67
|
+
// projectDir,
|
|
68
|
+
// '/../../../node_modules/react-native/android'
|
|
69
|
+
// )
|
|
70
|
+
// }
|
|
71
|
+
//
|
|
72
|
+
// if (defaultDir.exists()) {
|
|
73
|
+
// maven {
|
|
74
|
+
// url defaultDir.toString()
|
|
75
|
+
// name androidSourcesName
|
|
76
|
+
// }
|
|
77
|
+
//
|
|
78
|
+
// logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
|
|
79
|
+
// found = true
|
|
80
|
+
// } else {
|
|
81
|
+
// def parentDir = rootProject.projectDir
|
|
82
|
+
//
|
|
83
|
+
// 1.upto(5, {
|
|
84
|
+
// if (found) return true
|
|
85
|
+
// parentDir = parentDir.parentFile
|
|
86
|
+
//
|
|
87
|
+
// def androidSourcesDir = new File(
|
|
88
|
+
// parentDir,
|
|
89
|
+
// 'node_modules/react-native'
|
|
90
|
+
// )
|
|
91
|
+
//
|
|
92
|
+
// def androidPrebuiltBinaryDir = new File(
|
|
93
|
+
// parentDir,
|
|
94
|
+
// 'node_modules/react-native/android'
|
|
95
|
+
// )
|
|
96
|
+
//
|
|
97
|
+
// if (androidPrebuiltBinaryDir.exists()) {
|
|
98
|
+
// maven {
|
|
99
|
+
// url androidPrebuiltBinaryDir.toString()
|
|
100
|
+
// name androidSourcesName
|
|
101
|
+
// }
|
|
102
|
+
//
|
|
103
|
+
// logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
|
|
104
|
+
// found = true
|
|
105
|
+
// } else if (androidSourcesDir.exists()) {
|
|
106
|
+
// maven {
|
|
107
|
+
// url androidSourcesDir.toString()
|
|
108
|
+
// name androidSourcesName
|
|
109
|
+
// }
|
|
110
|
+
//
|
|
111
|
+
// logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
|
|
112
|
+
// found = true
|
|
113
|
+
// }
|
|
114
|
+
// })
|
|
115
|
+
// }
|
|
116
|
+
//
|
|
117
|
+
// if (!found) {
|
|
118
|
+
// throw new GradleException(
|
|
119
|
+
// "${project.name}: unable to locate React Native android sources. " +
|
|
120
|
+
// "Ensure you have you installed React Native as a dependency in your project and try again."
|
|
121
|
+
// )
|
|
122
|
+
// }
|
|
123
|
+
//}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
dependencies {
|
|
127
|
+
//noinspection GradleDynamicVersion
|
|
128
|
+
implementation "com.facebook.react:react-native:+"
|
|
129
|
+
// From node_modules
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//if (isNewArchitectureEnabled()) {
|
|
133
|
+
// react {
|
|
134
|
+
// jsRootDir = file("../src/")
|
|
135
|
+
// libraryName = "RoxitCodeScanner"
|
|
136
|
+
// codegenJavaPackageName = "com.roxitcodescanner"
|
|
137
|
+
// }
|
|
138
|
+
//}
|