Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into community #1819

Merged
merged 8 commits into from
Jan 2, 2025
Merged
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
22 changes: 0 additions & 22 deletions .github/workflows/check-pr-title.yml

This file was deleted.

22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
name: Build MacOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
binary: macos
build: '["macos"]'
runner: macos-latest
binary: macos
build: '["macos"]'

build-linux:
name: Build Linux
Expand Down Expand Up @@ -220,14 +220,14 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Fetch artifacts
uses: actions/download-artifact@v4
Expand All @@ -251,7 +251,7 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-33-x86_64
key: avd-31-x86_64_2

- name: Create Android Emulator and generate snapshot for caching
if: ${{ steps.avd-cache.outputs.cache-hit != 'true' }}
Expand All @@ -262,9 +262,8 @@ jobs:
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
api-level: 31
arch: x86_64
ndk: 25.2.9519653
cmake: 3.10.2.4988404
script: echo "Generated Emulator snapshot for caching."
ndk: 27.0.12077973

- name: Run tests on Android Emulator
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -274,9 +273,8 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
api-level: 31
arch: x86_64
ndk: 25.2.9519653
cmake: 3.10.2.4988404
script: cd packages/realm/tests && flutter test integration_test/all_tests.dart --file-reporter=json:test-results.json --suppress-analytics
ndk: 27.0.12077973

- name: Publish Test Report
uses: dorny/[email protected]
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
### Internal
* Using Core 20.0.1.

## 3.4.2 (2025-01-02)

### Fixed
* For the Android platform, changed compileSdkVersion into 31 from 28 to fix the fatal `android:attr/lStar not found` error when using Flutter 3.24.
* Fix breakage of `PseudoType` after Flutter 3.27.1. (Issue [#1813](https://github.com/realm/realm-dart/issues/1813))

### Compatibility
* Realm Studio: 15.0.0 or later.

### Internal
* Using Core 14.11.0.

## 3.4.1 (2024-08-14)

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
> [!WARNING]
> We announced the deprecation of Atlas Device Sync + Realm SDKs in September 2024. For more information please see:
> - [SDK Deprecation](https://www.mongodb.com/docs/atlas/device-sdks/deprecation)
> - [Device Sync Deprecation](https://www.mongodb.com/docs/atlas/app-services/sync/device-sync-deprecation)
>
> For a version of `realm-dart` without sync features, install version 20 or see the `community` branch.

<picture>
<source srcset="./media/logo-dark.svg" media="(prefers-color-scheme: dark)" alt="realm by MongoDB">
<img src="./media/logo.svg" alt="realm by MongoDB">
Expand Down
4 changes: 4 additions & 0 deletions packages/CHANGELOG.ejson.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.1

- Avoid name conflict on `LinkCode`.

## 0.4.0

- `fromEJson<T>` now accepts a `defaultValue` argument that is returned if
Expand Down
4 changes: 2 additions & 2 deletions packages/ejson_lint/lib/src/lints/mismatched_getter_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as error;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:ejson_analyzer/ejson_analyzer.dart';
Expand All @@ -13,7 +13,7 @@ class MismatchedGetterType extends DartLintRule {
code: const LintCode(
name: 'mismatched_getter_type',
problemMessage: 'Type of getter does not match type of constructor parameter',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: error.ErrorSeverity.ERROR,
),
);

Expand Down
4 changes: 2 additions & 2 deletions packages/ejson_lint/lib/src/lints/missing_getter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as error;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:ejson_analyzer/ejson_analyzer.dart';
Expand All @@ -13,7 +13,7 @@ class MissingGetter extends DartLintRule {
code: const LintCode(
name: 'missing_getter',
problemMessage: 'Missing getter for constructor parameter',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: error.ErrorSeverity.ERROR,
),
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024 MongoDB, Inc.
// SPDX-License-Identifier: Apache-2.0

import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as error;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:ejson_analyzer/ejson_analyzer.dart';
Expand All @@ -21,7 +21,7 @@ class TooManyAnnotatedConstructors extends DartLintRule {
code: const LintCode(
name: 'too_many_annotated_constructors',
problemMessage: 'Only one constructor can be annotated',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: error.ErrorSeverity.ERROR,
),
);

Expand Down
2 changes: 1 addition & 1 deletion packages/realm/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
namespace 'io.realm'
}

compileSdkVersion 28
compileSdkVersion 31

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
2 changes: 1 addition & 1 deletion packages/realm/tests/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version '8.7.0' apply false
}

include ":app"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import 'package:source_span/source_span.dart';

class ExpandedContextSpan with SourceSpanMixin implements FileSpan {
class ExpandedContextSpan extends SourceSpanMixin implements FileSpan {
final FileSpan _span, _contextSpan;

ExpandedContextSpan(this._span, Iterable<FileSpan> contextSpans) : _contextSpan = contextSpans.fold<FileSpan>(_span, (acc, c) => acc.expand(c));
Expand Down
14 changes: 3 additions & 11 deletions packages/realm_generator/lib/src/pseudo_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ class PseudoType extends TypeImpl {

PseudoType(this._name, {this.nullabilitySuffix = NullabilitySuffix.none});

Never get _never => throw UnimplementedError();

@override
R accept<R>(TypeVisitor<R> visitor) => _never;

@override
R acceptWithArgument<R, A>(TypeVisitorWithArgument<R, A> visitor, A argument) => _never;
R acceptWithArgument<R, A>(TypeVisitorWithArgument<R, A> visitor, A argument) => throw UnimplementedError();

@override
void appendTo(ElementDisplayStringBuilder builder) {
Expand All @@ -46,17 +41,14 @@ class PseudoType extends TypeImpl {
im.invoke(writeNullability, <dynamic>[nullabilitySuffix]); // #_writeNullability won't work
}

@override
String? get name => _never;

@override
PseudoType withNullability(NullabilitySuffix nullabilitySuffix) {
return PseudoType(_name, nullabilitySuffix: nullabilitySuffix);
}

@override
Element? get element2 => _never;
Element? get element => null;

@override
Element? get element => null;
Never noSuchMethod(Invocation invocation) => throw UnimplementedError();
}
Loading