@bravemobile/react-native-code-push 13.3.0 → 13.3.2

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.
Files changed (42) hide show
  1. package/android/build.gradle +50 -16
  2. package/android/{app/src → src}/main/cpp/CMakeLists.txt +5 -1
  3. package/package.json +1 -5
  4. package/react-native.config.js +1 -1
  5. package/android/app/build.gradle +0 -58
  6. package/android/gradle.properties +0 -20
  7. package/android/settings.gradle +0 -1
  8. /package/android/{app/proguard-rules.pro → proguard-rules.pro} +0 -0
  9. /package/android/{app/src → src}/debug/AndroidManifest.xml +0 -0
  10. /package/android/{app/src → src}/main/AndroidManifest.xml +0 -0
  11. /package/android/{app/src → src}/main/cpp/binarypatch_jni.c +0 -0
  12. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/ArchiveAttemptLog.java +0 -0
  13. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/ArchiveRestoreResult.java +0 -0
  14. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePush.java +0 -0
  15. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushBinaryPatch.java +0 -0
  16. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushConstants.java +0 -0
  17. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushErrorCode.java +0 -0
  18. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushHttpException.java +0 -0
  19. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushIncompleteDownloadException.java +0 -0
  20. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +0 -0
  21. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +0 -0
  22. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +0 -0
  23. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +0 -0
  24. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +0 -0
  25. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +0 -0
  26. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +0 -0
  27. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +0 -0
  28. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +0 -0
  29. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +0 -0
  30. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/CodePushUtils.java +0 -0
  31. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/DownloadProgress.java +0 -0
  32. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +0 -0
  33. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/DownloadProgressEventDispatcher.java +0 -0
  34. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/FileUtils.java +0 -0
  35. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/HDiffPatchNative.java +0 -0
  36. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/SettingsManager.java +0 -0
  37. /package/android/{app/src → src}/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +0 -0
  38. /package/android/{app/src → src}/test/java/com/microsoft/codepush/react/CodePushBinaryPatchTest.java +0 -0
  39. /package/android/{app/src → src}/test/java/com/microsoft/codepush/react/CodePushErrorCodeTest.java +0 -0
  40. /package/android/{app/src → src}/test/java/com/microsoft/codepush/react/CodePushUpdateManagerBinaryPatchTest.java +0 -0
  41. /package/android/{app/src → src}/test/java/com/microsoft/codepush/react/CodePushUpdateManagerDownloadTest.java +0 -0
  42. /package/android/{app/src → src}/test/java/com/microsoft/codepush/react/DownloadProgressEventDispatcherTest.java +0 -0
@@ -1,24 +1,58 @@
1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
1
+ apply plugin: "com.android.library"
2
+ apply plugin: "com.facebook.react"
2
3
 
3
- buildscript {
4
- repositories {
5
- google()
6
- mavenCentral()
4
+ def DEFAULT_COMPILE_SDK_VERSION = 26
5
+ def DEFAULT_BUILD_TOOLS_VERSION = "26.0.3"
6
+ def DEFAULT_TARGET_SDK_VERSION = 26
7
+ def DEFAULT_MIN_SDK_VERSION = 16
8
+
9
+ react {
10
+ jsRootDir = file("..")
11
+ libraryName = "RNCodePushSpec"
12
+ codegenJavaPackageName = "com.microsoft.codepush.react"
13
+ }
14
+
15
+ android {
16
+ namespace "com.microsoft.codepush.react"
17
+
18
+ compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
19
+ buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
20
+
21
+ defaultConfig {
22
+ minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
23
+ targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
24
+ versionCode 1
25
+ versionName "1.0"
7
26
  }
8
- dependencies {
9
- classpath 'com.android.tools.build:gradle:1.3.0'
10
27
 
11
- // NOTE: Do not place your application dependencies here; they belong
12
- // in the individual module build.gradle files
28
+ lintOptions {
29
+ abortOnError false
13
30
  }
14
- }
15
31
 
16
- allprojects {
17
- android {
18
- namespace "com.microsoft.codepush.react"
32
+ defaultConfig {
33
+ consumerProguardFiles 'proguard-rules.pro'
19
34
  }
20
- repositories {
21
- mavenLocal()
22
- mavenCentral()
35
+
36
+ // Builds the binary patch applier. Its sources are the shared ones at the root of the
37
+ // repository, which the CMake file points at; nothing is compiled twice.
38
+ externalNativeBuild {
39
+ cmake {
40
+ path "src/main/cpp/CMakeLists.txt"
41
+ }
42
+ }
43
+
44
+ testOptions {
45
+ // The unit tests exercise plain logic, so the android framework classes they touch
46
+ // in passing (logging above all) are allowed to do nothing instead of throwing.
47
+ unitTests.returnDefaultValues = true
23
48
  }
24
49
  }
50
+
51
+ dependencies {
52
+ implementation "com.facebook.react:react-native:+"
53
+
54
+ testImplementation "junit:junit:4.13.2"
55
+ // org.json ships as stubs in the android framework jar, and the unit tests parse real
56
+ // manifests, so they need an implementation that actually parses.
57
+ testImplementation "org.json:json:20231013"
58
+ }
@@ -6,7 +6,7 @@ project(codepush-binarypatch C)
6
6
  # the other platform compile the very same files. Referencing them where they are is
7
7
  # what keeps the appliers of the platforms from drifting apart, so they are deliberately
8
8
  # not copied into this directory.
9
- set(BINARY_PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../cpp/binarypatch)
9
+ set(BINARY_PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cpp/binarypatch)
10
10
 
11
11
  add_library(codepush-binarypatch SHARED
12
12
  ${CMAKE_CURRENT_SOURCE_DIR}/binarypatch_jni.c
@@ -34,5 +34,9 @@ target_compile_definitions(codepush-binarypatch PRIVATE
34
34
  ZSTD_DISABLE_ASM=1
35
35
  _IS_USED_MULTITHREAD=0)
36
36
 
37
+ target_link_options(codepush-binarypatch PRIVATE
38
+ "-Wl,-z,max-page-size=16384"
39
+ "-Wl,-z,common-page-size=16384")
40
+
37
41
  find_library(log-lib log)
38
42
  target_link_libraries(codepush-binarypatch ${log-lib})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bravemobile/react-native-code-push",
3
- "version": "13.3.0",
3
+ "version": "13.3.2",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "src/CodePush.js",
6
6
  "react-native": "src/CodePush.js",
@@ -58,10 +58,6 @@
58
58
  "!ios/build",
59
59
  "!ios/CodePushTests",
60
60
  "!android/build",
61
- "!android/app/build",
62
- "!android/gradle",
63
- "!android/gradlew",
64
- "!android/gradlew.bat",
65
61
  "!android/local.properties",
66
62
  "!cpp/binarypatch/host",
67
63
  "!**/__tests__",
@@ -5,7 +5,7 @@ module.exports = {
5
5
  packageImportPath: "import com.microsoft.codepush.react.CodePush;",
6
6
  packageInstance:
7
7
  "CodePush.getInstance(getApplicationContext(), BuildConfig.DEBUG)",
8
- sourceDir: './android/app',
8
+ sourceDir: './android',
9
9
  libraryName: 'RNCodePushSpec',
10
10
  cmakeListsPath: 'build/generated/source/codegen/jni/CMakeLists.txt',
11
11
  }
@@ -1,58 +0,0 @@
1
- apply plugin: "com.android.library"
2
- apply plugin: "com.facebook.react"
3
-
4
- def DEFAULT_COMPILE_SDK_VERSION = 26
5
- def DEFAULT_BUILD_TOOLS_VERSION = "26.0.3"
6
- def DEFAULT_TARGET_SDK_VERSION = 26
7
- def DEFAULT_MIN_SDK_VERSION = 16
8
-
9
- react {
10
- jsRootDir = file("../..")
11
- libraryName = "RNCodePushSpec"
12
- codegenJavaPackageName = "com.microsoft.codepush.react"
13
- }
14
-
15
- android {
16
- namespace "com.microsoft.codepush.react"
17
-
18
- compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
19
- buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
20
-
21
- defaultConfig {
22
- minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
23
- targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
24
- versionCode 1
25
- versionName "1.0"
26
- }
27
-
28
- lintOptions {
29
- abortOnError false
30
- }
31
-
32
- defaultConfig {
33
- consumerProguardFiles 'proguard-rules.pro'
34
- }
35
-
36
- // Builds the binary patch applier. Its sources are the shared ones at the root of the
37
- // repository, which the CMake file points at; nothing is compiled twice.
38
- externalNativeBuild {
39
- cmake {
40
- path "src/main/cpp/CMakeLists.txt"
41
- }
42
- }
43
-
44
- testOptions {
45
- // The unit tests exercise plain logic, so the android framework classes they touch
46
- // in passing (logging above all) are allowed to do nothing instead of throwing.
47
- unitTests.returnDefaultValues = true
48
- }
49
- }
50
-
51
- dependencies {
52
- implementation "com.facebook.react:react-native:+"
53
-
54
- testImplementation "junit:junit:4.13.2"
55
- // org.json ships as stubs in the android framework jar, and the unit tests parse real
56
- // manifests, so they need an implementation that actually parses.
57
- testImplementation "org.json:json:20231013"
58
- }
@@ -1,20 +0,0 @@
1
- # Project-wide Gradle settings.
2
-
3
- # IDE (e.g. Android Studio) users:
4
- # Gradle settings configured through the IDE *will override*
5
- # any settings specified in this file.
6
-
7
- # For more details on how to configure your build environment visit
8
- # http://www.gradle.org/docs/current/userguide/build_environment.html
9
-
10
- # Specifies the JVM arguments used for the daemon process.
11
- # The setting is particularly useful for tweaking memory settings.
12
- # Default value: -Xmx10248m -XX:MaxPermSize=256m
13
- # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
-
15
- # When configured, Gradle will run in incubating parallel mode.
16
- # This option should only be used with decoupled projects. More details, visit
17
- # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
- # org.gradle.parallel=true
19
-
20
- android.useDeprecatedNdk=true
@@ -1 +0,0 @@
1
- include ':app'