1
+ buildscript {
2
+ def androidDir = " ${ buildscript.sourceFile.getParent()} /../"
3
+ apply(from : " $androidDir /test-app-util.gradle" )
4
+ apply(from : " $androidDir /dependencies.gradle" )
5
+ }
6
+
7
+ plugins {
8
+ id(" com.android.application" )
9
+ id(" kotlin-android" )
10
+ id(" kotlin-kapt" )
11
+ }
12
+
1
13
// `react-native run-android` is hard-coded to look for the output APK at a very
2
14
// specific location. See
3
15
// https://github.com/react-native-community/cli/blob/6cf12b00c02aca6d4bc843446394331d71a9749e/packages/platform-android/src/commands/runAndroid/index.ts#L180
4
16
buildDir = " $rootDir /$name /build"
5
17
6
18
def reactNativeDir = findNodeModulesPath(rootDir, " react-native" )
7
19
8
- buildscript {
9
- def androidDir = " ${ buildscript.sourceFile.getParent()} /../"
10
- apply from : " $androidDir /test-app-util.gradle"
11
- apply from : " $androidDir /dependencies.gradle"
12
-
13
- repositories {
14
- google()
15
- mavenCentral()
16
- }
17
- }
18
-
19
20
repositories {
20
21
maven {
21
- url(" ${ reactNativeDir} /android" )
22
+ url = uri (" ${ reactNativeDir} /android" )
22
23
}
23
24
24
- google()
25
25
mavenCentral()
26
+ google()
26
27
27
28
// TODO: Remove these when they've been published to Maven Central.
28
29
// See https://github.com/microsoft/react-native-test-app/issues/305
@@ -38,19 +39,11 @@ repositories {
38
39
39
40
// https://github.com/AzureAD/microsoft-authentication-library-for-android#step-1-declare-dependency-on-msal
40
41
maven {
41
- url ' https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1'
42
+ url = uri( " https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1" )
42
43
}
43
44
}
44
45
45
- apply from : " $projectDir /../force-resolve-trove4j.gradle"
46
-
47
- apply plugin : " com.android.application"
48
- apply plugin : " kotlin-android"
49
- apply plugin : " kotlin-kapt"
50
-
51
- def testAppDir = file(" $projectDir /../../" )
52
-
53
- apply from : file(" ${ testAppDir} /test-app.gradle" )
46
+ apply(from : " $projectDir /../../test-app.gradle" )
54
47
applyTestAppModule(project)
55
48
56
49
project. ext. react = [
@@ -91,7 +84,7 @@ android {
91
84
def recommendedFlipperVersion = getFlipperRecommendedVersion(rootDir)
92
85
buildConfigField " String" ,
93
86
" ReactTestApp_recommendedFlipperVersion" ,
94
- recommendedFlipperVersion ? " \" ${ recommendedFlipperVersion} \" " : ' "0" '
87
+ recommendedFlipperVersion ? " \" ${ recommendedFlipperVersion} \" " : " \" 0 \" "
95
88
96
89
resValue " string" , " app_name" , project. ext. react. appName
97
90
@@ -107,7 +100,7 @@ android {
107
100
108
101
sourceSets {
109
102
if (project. ext. react. enableFlipper) {
110
- debug. java. srcDirs + = ' src/flipper/java'
103
+ debug. java. srcDirs + = " src/flipper/java"
111
104
}
112
105
}
113
106
}
@@ -129,14 +122,15 @@ dependencies {
129
122
}
130
123
131
124
if (buildReactNativeFromSource(rootDir)) {
132
- implementation project(' :ReactAndroid' )
125
+ implementation project(" :ReactAndroid" )
133
126
} else {
134
127
implementation " com.facebook.react:react-native:+"
135
128
}
136
129
137
130
implementation libraries. kotlinStdlibJdk7
138
131
implementation libraries. kotlinStdlibJdk8
139
132
implementation libraries. kotlinReflect
133
+
140
134
implementation libraries. androidAppCompat
141
135
implementation libraries. androidCoreKotlinExtensions
142
136
implementation libraries. androidRecyclerView
@@ -155,13 +149,13 @@ dependencies {
155
149
if (project. ext. react. enableFlipper) {
156
150
def flipperVersion = project. ext. react. enableFlipper
157
151
debugImplementation(" com.facebook.flipper:flipper:${ flipperVersion} " ) {
158
- exclude group : ' com.facebook.fbjni'
152
+ exclude( group : " com.facebook.fbjni" )
159
153
}
160
154
debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ flipperVersion} " ) {
161
- exclude group : ' com.facebook.flipper'
155
+ exclude( group : " com.facebook.flipper" )
162
156
}
163
157
debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ flipperVersion} " ) {
164
- exclude group : ' com.facebook.flipper'
158
+ exclude( group : " com.facebook.flipper" )
165
159
}
166
160
}
167
161
}
0 commit comments