Repository navigation
Expand file tree
/
Copy pathsettings.gradle
More file actions
45 lines (44 loc) · 1.93 KB
/
Copy pathsettings.gradle
File metadata and controls
45 lines (44 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Standalone build for the Android bridge's unit tests. In a real app the
// module is pulled in by React Native autolinking, which supplies its own
// settings; this exists so `./gradlew test` can run the marshalling tests in
// CI without first building an example app.
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins {
// Pinned here rather than in the module, so the standalone test build
// and a consuming app cannot disagree about AGP.
id 'com.android.library' version '8.6.0'
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
rootProject.name = 'bugsee-react-native'
include ':bugsee-android-bridge'
project(':bugsee-android-bridge').projectDir = file('packages/react-native/android')
include ':bugsee-android-feedback'
project(':bugsee-android-feedback').projectDir = file('packages/react-native-feedback/android')
// The module directory is ALSO built by the example app
// (examples/bare/android, via autolinking as :bugsee_react-native), and both
// builds default to writing into packages/react-native/android/build/. Run
// one after the other without a clean in between and each sees the other's
// stale classes, generated codegen and test results -- previously misread as
// a real test failure. Redirecting only this standalone build's output
// leaves the example's build (and its own default build/ directory) alone.
// `layout.buildDirectory`, not the deprecated `buildDir` setter, because that
// is what a lazy Provider-based redirect requires post-AGP-8.
gradle.beforeProject { project ->
if (project.path == ':bugsee-android-bridge') {
project.layout.buildDirectory.set(new File(settingsDir, 'build/android-bridge'))
}
if (project.path == ':bugsee-android-feedback') {
project.layout.buildDirectory.set(new File(settingsDir, 'build/android-feedback'))
}
}