Skip to content

Commit e837120

Browse files
authored
fix(Android): Android build artifacts pollute installation folder (#176)
Android build artifacts are currently output under `node_modules/react-native-test-app/android`. In a [monorepo](https://github.com/microsoft/react-native-test-app/wiki#folder-structures), multiple packages can share the same installation if it was hoisted, e.g.: ``` my-monorepo ├── node_modules │ └── react-native-test-app │ └── android # Used by both packages ├── package.json └── packages ├── my-awesome-component-android │ ├── build.gradle │ ├── package.json │ ├── settings.gradle │ └── src └── my-second-awesome-component-android ├── build.gradle ├── package.json ├── settings.gradle └── src ``` In this example, `node_modules/react-native-test-app/android` may contain build artifacts from both `my-awesome-component-android` and `my-second-awesome-component-android`.
1 parent 6073906 commit e837120

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
.DS_Store
55
.gradle/
66
.idea/
7+
.vs/
78
Pods/
8-
build/
99
clang-format-diff.py
1010
dist/
11+
example/android/build/
1112
local.properties
1213
node_modules/
1314
!test/fixtures/**/node_modules/
1415
package-lock.json
1516
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1617
xcuserdata/
1718
yarn-error.log*
18-
.vs/

android/app/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
buildDir = "$rootDir/build"
2+
13
buildscript {
24
ext.kotlinVersion = "1.3.72"
35

@@ -11,7 +13,7 @@ buildscript {
1113

1214
dependencies {
1315
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
14-
classpath "com.android.tools.build:gradle:3.6.2"
16+
classpath "com.android.tools.build:gradle:3.6.4"
1517
}
1618
}
1719

@@ -96,9 +98,9 @@ dependencies {
9698

9799
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
98100
implementation "androidx.appcompat:appcompat:1.1.0"
99-
implementation "androidx.core:core-ktx:1.2.0"
101+
implementation "androidx.core:core-ktx:1.3.1"
100102
implementation "androidx.recyclerview:recyclerview:1.1.0"
101-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
103+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
102104
implementation "com.google.android.material:material:1.1.0"
103105

104106
implementation("com.squareup.moshi:moshi-kotlin:1.9.2")

0 commit comments

Comments
 (0)