Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/android/patches/makeBuildPatch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = function makeBuildPatch(name) {
return {
pattern: /[^ \t]dependencies {\n/,
patch: ` compile project(':${name}')\n`,
patch: ` compile project(':${name}') {
exclude group: 'com.facebook.react', module: 'react-native'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlinking wise, shouldn't we handle both cases? (to be backwards compatible) Or isn't that changing anything?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, actually it does affect unlinking. Hmmm...

}\n`,
};
};
5 changes: 3 additions & 2 deletions test/android/patches/makeBuildPatch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ describe('makeBuildPatch', () => {
});

it('should make a correct patch', () => {
expect(makeBuildPatch(name).patch)
.to.be.equal(` compile project(':${name}')\n`);
expect(makeBuildPatch(name).patch).to.be.equal(` compile project(':${name}') {
exclude group: 'com.facebook.react', module: 'react-native'
}\n`);
});
});
2 changes: 1 addition & 1 deletion test/android/patches/makeSettingsPatch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const dependencyConfig = {
describe('makeSettingsPatch', () => {
it('should build a patch function', () => {
expect(
makeSettingsPatch(name, dependencyConfig, {}, projectConfig)
makeSettingsPatch(name, dependencyConfig, projectConfig)
).to.be.an('object');
});

Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/android/patchedBuild.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
dependencies {
compile project(':test')
compile project(':test') {
exclude group: 'com.facebook.react', module: 'react-native'
}
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:0.18.+"
Expand Down