1- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31buildscript {
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}
0 commit comments