Skip to content

Commit

Permalink
- [dependencies][android] remove all Firebase SDKs in favour of Fireb…
Browse files Browse the repository at this point in the history
…ase BoM

- [android] upgrade to Android X
- [android] upgrade gradle wrapper to v5.4.1
- [android][ios][tests] remove manual packages & enable auto-linking
- [tests][internal] upgrade tests project to RN 60
- [ios] temporarily remove framework support in pods - broken in RN 60 - see facebook/react-native#25349
- [linting] switch to use rn community linting rules
  • Loading branch information
Salakar committed Jul 30, 2019
1 parent f8724c2 commit 1e649dc
Show file tree
Hide file tree
Showing 57 changed files with 309 additions and 278 deletions.
2 changes: 1 addition & 1 deletion RNFBFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Pod::Spec.new do |s|
s.dependency 'Firebase/Core', '~> 6.5.0'
s.dependency 'Firebase/Firestore', '~> 6.5.0'
s.dependency 'RNFBApp'
s.static_framework = true
s.static_framework = false
end
16 changes: 6 additions & 10 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.4.2'
}
}

Expand All @@ -15,7 +15,7 @@ plugins {
project.ext {
set('react-native', [
versions: [
android : [
android : [
minSdk : 16,
targetSdk : 28,
compileSdk: 28,
Expand All @@ -24,12 +24,8 @@ project.ext {
buildTools: "28.0.3"
],

googlePlayServices: [
base: "16.1.0",
],

firebase : [
firestore: "19.0.2"
firebase: [
bom: "21.1.0",
],
],
])
Expand Down Expand Up @@ -61,8 +57,8 @@ repositories {

dependencies {
api project(':@react-native-firebase_app')
implementation "com.google.firebase:firebase-firestore:${ReactNative.ext.getVersion("firebase", "firestore")}"
implementation "com.google.android.gms:play-services-base:${ReactNative.ext.getVersion("googlePlayServices", "base")}"
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
implementation "com.google.firebase:firebase-firestore"
}

ReactNative.shared.applyPackageVersion()
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
2 changes: 1 addition & 1 deletion e2e/Blob.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('firestore.Blob', () => {
new firebase.firestore.Blob();
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`constructor is private`);
error.message.should.containEql('constructor is private');
return Promise.resolve();
}
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/CollectionReference/add.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore.collection().add()', () => {
.add(123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'data' must be an object`);
error.message.should.containEql("'data' must be an object");
return Promise.resolve();
}
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/CollectionReference/doc.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore.collection().doc()', () => {
.doc('bar/baz');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'documentPath' must point to a document`);
error.message.should.containEql("'documentPath' must point to a document");
return Promise.resolve();
}
});
Expand Down
6 changes: 3 additions & 3 deletions e2e/DocumentReference/collection.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('firestore.doc().collection()', () => {
.collection(123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'collectionPath' must be a string value`);
error.message.should.containEql("'collectionPath' must be a string value");
return Promise.resolve();
}
});
Expand All @@ -37,7 +37,7 @@ describe('firestore.doc().collection()', () => {
.collection('');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'collectionPath' must be a non-empty string`);
error.message.should.containEql("'collectionPath' must be a non-empty string");
return Promise.resolve();
}
});
Expand All @@ -50,7 +50,7 @@ describe('firestore.doc().collection()', () => {
.collection('foo/bar');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'collectionPath' must point to a collection`);
error.message.should.containEql("'collectionPath' must point to a collection");
return Promise.resolve();
}
});
Expand Down
4 changes: 2 additions & 2 deletions e2e/DocumentReference/get.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore.doc().get()', () => {
.get('foo');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'options' must be an object is provided`);
error.message.should.containEql("'options' must be an object is provided");
return Promise.resolve();
}
});
Expand All @@ -42,7 +42,7 @@ describe('firestore.doc().get()', () => {
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(
`'options' GetOptions.source must be one of 'default', 'server' or 'cache'`,
"'options' GetOptions.source must be one of 'default', 'server' or 'cache'",
);
return Promise.resolve();
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/DocumentReference/isEqual.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('firestore.doc().isEqual()', () => {
.isEqual(123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'other' expected a DocumentReference instance`);
error.message.should.containEql("'other' expected a DocumentReference instance");
return Promise.resolve();
}
});
Expand Down
8 changes: 4 additions & 4 deletions e2e/DocumentReference/onSnapshot.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore().doc().onSnapshot()', () => {
.onSnapshot();
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`expected at least one argument`);
error.message.should.containEql('expected at least one argument');
return Promise.resolve();
}
});
Expand Down Expand Up @@ -302,7 +302,7 @@ describe('firestore().doc().onSnapshot()', () => {
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(
`'options' SnapshotOptions.includeMetadataChanges must be a boolean value`,
"'options' SnapshotOptions.includeMetadataChanges must be a boolean value",
);
return Promise.resolve();
}
Expand All @@ -318,7 +318,7 @@ describe('firestore().doc().onSnapshot()', () => {
});
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'observer.next' or 'onNext' expected a function`);
error.message.should.containEql("'observer.next' or 'onNext' expected a function");
return Promise.resolve();
}
});
Expand All @@ -333,7 +333,7 @@ describe('firestore().doc().onSnapshot()', () => {
});
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'observer.error' or 'onError' expected a function`);
error.message.should.containEql("'observer.error' or 'onError' expected a function");
return Promise.resolve();
}
});
Expand Down
12 changes: 6 additions & 6 deletions e2e/DocumentReference/set.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore.doc().set()', () => {
.set('foo');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'data' must be an object`);
error.message.should.containEql("'data' must be an object");
return Promise.resolve();
}
});
Expand All @@ -41,7 +41,7 @@ describe('firestore.doc().set()', () => {
.set({}, 'foo');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'options' must be an object`);
error.message.should.containEql("'options' must be an object");
return Promise.resolve();
}
});
Expand All @@ -60,7 +60,7 @@ describe('firestore.doc().set()', () => {
);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'options' must not contain both 'merge' & 'mergeFields'`);
error.message.should.containEql("'options' must not contain both 'merge' & 'mergeFields'");
return Promise.resolve();
}
});
Expand All @@ -78,7 +78,7 @@ describe('firestore.doc().set()', () => {
);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'options.merge' must be a boolean value`);
error.message.should.containEql("'options.merge' must be a boolean value");
return Promise.resolve();
}
});
Expand All @@ -96,7 +96,7 @@ describe('firestore.doc().set()', () => {
);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'options.mergeFields' must be an array`);
error.message.should.containEql("'options.mergeFields' must be an array");
return Promise.resolve();
}
});
Expand All @@ -115,7 +115,7 @@ describe('firestore.doc().set()', () => {
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(
`'options.mergeFields' all fields must be of type string or FieldPath, but the value at index 3 was number`,
"'options.mergeFields' all fields must be of type string or FieldPath, but the value at index 3 was number",
);
return Promise.resolve();
}
Expand Down
6 changes: 3 additions & 3 deletions e2e/DocumentReference/update.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('firestore.doc().update()', () => {
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(
`expected at least 1 argument but was called with 0 arguments`,
'expected at least 1 argument but was called with 0 arguments',
);
return Promise.resolve();
}
Expand All @@ -43,7 +43,7 @@ describe('firestore.doc().update()', () => {
.update({});
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.code.should.containEql(`firestore/not-found`);
error.code.should.containEql('firestore/not-found');
return Promise.resolve();
}
});
Expand All @@ -56,7 +56,7 @@ describe('firestore.doc().update()', () => {
.update('foo', 'bar', 'baz');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`or equal numbers of key/value pairs`);
error.message.should.containEql('or equal numbers of key/value pairs');
return Promise.resolve();
}
});
Expand Down
10 changes: 5 additions & 5 deletions e2e/DocumentSnapshot/get.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('firestore().doc() -> snapshot.get()', () => {
snapshot.get(123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'fieldPath' expected type string or FieldPath`);
error.message.should.containEql("'fieldPath' expected type string or FieldPath");
return Promise.resolve();
}
});
Expand All @@ -41,7 +41,7 @@ describe('firestore().doc() -> snapshot.get()', () => {
snapshot.get('');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'fieldPath' Invalid field path`);
error.message.should.containEql("'fieldPath' Invalid field path");
return Promise.resolve();
}
});
Expand All @@ -54,7 +54,7 @@ describe('firestore().doc() -> snapshot.get()', () => {
snapshot.get('.foo');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'fieldPath' Invalid field path`);
error.message.should.containEql("'fieldPath' Invalid field path");
return Promise.resolve();
}
});
Expand All @@ -67,7 +67,7 @@ describe('firestore().doc() -> snapshot.get()', () => {
snapshot.get('foo.');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'fieldPath' Invalid field path`);
error.message.should.containEql("'fieldPath' Invalid field path");
return Promise.resolve();
}
});
Expand All @@ -80,7 +80,7 @@ describe('firestore().doc() -> snapshot.get()', () => {
snapshot.get('foo..bar');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'fieldPath' Invalid field path`);
error.message.should.containEql("'fieldPath' Invalid field path");
return Promise.resolve();
}
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/DocumentSnapshot/isEqual.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('firestore.doc() -> snapshot.isEqual()', () => {
docSnapshot.isEqual(123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'other' expected a DocumentSnapshot instance`);
error.message.should.containEql("'other' expected a DocumentSnapshot instance");
return Promise.resolve();
}
});
Expand Down
12 changes: 6 additions & 6 deletions e2e/FieldPath.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('firestore.FieldPath', () => {
new firebase.firestore.FieldPath();
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`cannot construct FieldPath with no segments`);
error.message.should.containEql('cannot construct FieldPath with no segments');
return Promise.resolve();
}
});
Expand All @@ -31,7 +31,7 @@ describe('firestore.FieldPath', () => {
new firebase.firestore.FieldPath('foo', '');
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`invalid segment at index`);
error.message.should.containEql('invalid segment at index');
return Promise.resolve();
}
});
Expand All @@ -41,7 +41,7 @@ describe('firestore.FieldPath', () => {
new firebase.firestore.FieldPath('foo', 123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`invalid segment at index`);
error.message.should.containEql('invalid segment at index');
return Promise.resolve();
}
});
Expand All @@ -55,7 +55,7 @@ describe('firestore.FieldPath', () => {
.where('.foo', '<', 123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`Invalid field path`);
error.message.should.containEql('Invalid field path');
return Promise.resolve();
}
});
Expand All @@ -69,7 +69,7 @@ describe('firestore.FieldPath', () => {
.where('foo/bar', '<', 123);
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`Paths must not contain`);
error.message.should.containEql('Paths must not contain');
return Promise.resolve();
}
});
Expand Down Expand Up @@ -100,7 +100,7 @@ describe('firestore.FieldPath', () => {
path.isEqual({});
return Promise.reject(new Error('Did not throw an Error.'));
} catch (error) {
error.message.should.containEql(`'other' expected instance of FieldPath`);
error.message.should.containEql("'other' expected instance of FieldPath");
return Promise.resolve();
}
});
Expand Down
Loading

0 comments on commit 1e649dc

Please sign in to comment.