Skip to content

Commit 36ee6b3

Browse files
authored
Merge pull request #20 from revopush/native_module_fix
fix issue #12
2 parents 6fa1064 + 19336b4 commit 36ee6b3

35 files changed

+50
-274
lines changed

.azurepipelines/build-rn-code-push-1es.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

.azurepipelines/test-rn-code-push.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.config/CredScanSuppressions.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

android/app/build.gradle

Lines changed: 0 additions & 48 deletions
This file was deleted.

android/build.gradle

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
42
repositories {
53
google()
@@ -13,12 +11,51 @@ buildscript {
1311
}
1412
}
1513

16-
allprojects {
17-
android {
18-
namespace "com.microsoft.codepush.react"
14+
apply plugin: "com.android.library"
15+
16+
def isNewArchitectureEnabled() {
17+
// To opt-in for the New Architecture, you can either:
18+
// - Set `newArchEnabled` to true inside the `gradle.properties` file
19+
// - Invoke gradle with `-newArchEnabled=true`
20+
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
21+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
22+
}
23+
24+
def IS_NEW_ARCHITECTURE_ENABLED = isNewArchitectureEnabled()
25+
26+
if (IS_NEW_ARCHITECTURE_ENABLED) {
27+
apply plugin: "com.facebook.react"
28+
}
29+
30+
def DEFAULT_COMPILE_SDK_VERSION = 26
31+
def DEFAULT_BUILD_TOOLS_VERSION = "26.0.3"
32+
def DEFAULT_TARGET_SDK_VERSION = 26
33+
def DEFAULT_MIN_SDK_VERSION = 16
34+
35+
android {
36+
namespace "com.microsoft.codepush.react"
37+
38+
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
39+
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
40+
41+
defaultConfig {
42+
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
43+
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
44+
versionCode 1
45+
versionName "1.0"
46+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", IS_NEW_ARCHITECTURE_ENABLED.toString()
1947
}
20-
repositories {
21-
mavenLocal()
22-
mavenCentral()
48+
49+
lintOptions {
50+
abortOnError false
2351
}
52+
53+
defaultConfig {
54+
consumerProguardFiles 'proguard-rules.pro'
55+
}
56+
}
57+
58+
dependencies {
59+
implementation "com.facebook.react:react-native:+"
60+
implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
2461
}
File renamed without changes.

android/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)