Skip to content

Commit d6cca79

Browse files
re-generate rtdb's api.txt and fail build if an error occurs parsing the file (#1692)
* Unified emulator settings for Firestore * chore(firebase-database): re-generate api.txt * chore(buildSrc): fail build if the current api.txt cannot be parsed * hide the database emulator * chore(firebase-database): re-generate api.txt with hidden method * Revert "Unified emulator settings for Firestore" This reverts commit c621f5b Co-authored-by: Sam <[email protected]>
1 parent caebf44 commit d6cca79

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

buildSrc/src/main/java/com/google/firebase/gradle/plugins/apiinfo/ApiInformationTask.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ void execute() {
147147
args.addAll(Arrays.asList("--baseline", getBaselineFile().getAbsolutePath()));
148148
}
149149
spec.setArgs(args);
150-
spec.setIgnoreExitValue(true);
151150
try {
152151
spec.setStandardOutput(new FileOutputStream(getOutputFile()));
153152
} catch (FileNotFoundException e) {

firebase-database/api.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ package com.google.firebase.database {
187187

188188
public class ServerValue {
189189
ctor public ServerValue();
190+
method @NonNull public static final Object increment(long);
191+
method @NonNull public static final Object increment(double);
190192
field @NonNull public static final java.util.Map<java.lang.String,java.lang.String> TIMESTAMP;
191-
field @NonNull public static final Object increment(double);
192-
field @NonNull public static final Object increment(long);
193193
}
194194

195195
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public @interface ThrowOnExtraProperties {

firebase-database/src/main/java/com/google/firebase/database/FirebaseDatabase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.google.firebase.database.core.utilities.Utilities;
3131
import com.google.firebase.database.core.utilities.Validation;
3232
import com.google.firebase.emulators.EmulatedServiceSettings;
33+
import com.google.firebase.emulators.EmulatorSettings;
3334
import com.google.firebase.emulators.FirebaseEmulator;
3435

3536
/**
@@ -39,6 +40,13 @@
3940
*/
4041
public class FirebaseDatabase {
4142

43+
/**
44+
* Emulator identifier. See {@link FirebaseApp#enableEmulators(EmulatorSettings)}
45+
*
46+
* <p>TODO(samstern): Un-hide this once Firestore, Database, and Functions are implemented
47+
*
48+
* @hide
49+
*/
4250
public static final FirebaseEmulator EMULATOR = FirebaseEmulator.forName("database");
4351

4452
private static final String SDK_VERSION = BuildConfig.VERSION_NAME;

0 commit comments

Comments
 (0)