Skip to content

Commit ddecd97

Browse files
committed
feat(Android): merge dev and release
1 parent 87e3666 commit ddecd97

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

android/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ repositories {
6666
rootProject.allprojects {
6767
repositories {
6868
maven{url "https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp"}
69-
maven{url "https://developer.huawei.com/repo/"}
7069
maven{url "https://jitpack.io"}
7170
}
7271
}
@@ -79,8 +78,7 @@ dependencies {
7978
//noinspection GradleDynamicVersion
8079
implementation "com.facebook.react:react-native"
8180
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
82-
debugImplementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:6.0.0-dev"
83-
releaseImplementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:6.0.0-release"
81+
implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:7.0.0"
8482
}
8583

8684
if (isNewArchitectureEnabled()) {

android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import com.facebook.react.bridge.ReadableMap
1212
import com.facebook.react.modules.core.DeviceEventManagerModule
1313

1414
class FreeraspReactNativeModule(val reactContext: ReactApplicationContext) :
15-
ReactContextBaseJavaModule(reactContext), ThreatListener.ThreatDetected, FreeraspDeviceStateListener.DeviceStateListener {
15+
ReactContextBaseJavaModule(reactContext), ThreatListener.ThreatDetected,
16+
FreeraspDeviceStateListener.DeviceStateListener {
1617

1718
private val listener = ThreatListener(this, FreeraspDeviceStateListener)
1819

@@ -104,7 +105,18 @@ class FreeraspReactNativeModule(val reactContext: ReactApplicationContext) :
104105
alternativeStores.add(stores.getString(i))
105106
}
106107
}
107-
return TalsecConfig(packageName, certificateHashes.toTypedArray(), watcherMail, alternativeStores.toTypedArray())
108+
var isProd = true
109+
if (config.hasKey("isProd")) {
110+
isProd = config.getBoolean("isProd")
111+
}
112+
113+
return TalsecConfig(
114+
packageName,
115+
certificateHashes.toTypedArray(),
116+
watcherMail,
117+
alternativeStores.toTypedArray(),
118+
isProd
119+
)
108120
}
109121

110122
companion object {

0 commit comments

Comments
 (0)