Skip to content

Commit

Permalink
fixing android build - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Jha committed Jan 8, 2025
1 parent 5637506 commit 8e5de18
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 33 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
java-version: "17.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
flutter-version: "3.24.4"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Set default branch.
run: git remote set-head origin --auto
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
java-version: "17.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
flutter-version: "3.24.4"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
java-version: "17.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
flutter-version: "3.24.4"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
Expand All @@ -230,7 +230,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
flutter-version: "3.24.4"
channel: "stable" # or: 'beta', 'dev' or 'master'
architecture: x64
- name: Building for ios
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
java-version: '17.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.3'
flutter-version: '3.24.4'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
java-version: '17.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.3'
flutter-version: '3.24.4'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
java-version: '17.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.3'
flutter-version: '3.24.4'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.3'
flutter-version: '3.24.4'
channel: 'stable' # or: 'beta', 'dev' or 'master'
architecture: x64
- name: Building for ios
Expand Down
4 changes: 4 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}

kotlinOptions {
Expand All @@ -75,4 +77,6 @@ flutter {
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.10"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'

}
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-7.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.2"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
id "com.android.application" version "8.6.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id("com.google.gms.google-services") version "4.4.1" apply false

}
Expand Down
6 changes: 6 additions & 0 deletions lib/services/image_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ class ImageService {
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9,
],
),
IOSUiSettings(
minimumAspectRatio: 1.0,
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9,
],
),
],
Expand Down
42 changes: 21 additions & 21 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.3"
file:
dependency: "direct main"
description:
Expand Down Expand Up @@ -881,18 +881,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.4"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -929,18 +929,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.15.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -1485,10 +1485,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
version: "0.7.2"
timelines:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1685,10 +1685,10 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: "7f8f25d7ad56819a82b2948357f3c3af071f6a678db33833b26ec36bbc221316"
sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
url: "https://pub.dev"
source: hosted
version: "2.4.11"
version: "2.7.16"
video_player_avfoundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1725,10 +1725,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.2.5"
watcher:
dependency: transitive
description:
Expand All @@ -1754,13 +1754,13 @@ packages:
source: hosted
version: "2.4.0"
win32:
dependency: transitive
dependency: "direct main"
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.10.0"
win32_registry:
dependency: transitive
description:
Expand Down Expand Up @@ -1794,5 +1794,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.4.0 <=3.4.4"
flutter: ">=3.22.0"
dart: ">=3.5.0 <=3.5.4"
flutter: ">=3.24.0"
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage: https://github.com/PalisadoesFoundation/talawa

repository: https://github.com/PalisadoesFoundation/talawa
environment:
sdk: ">=2.17.0 <=3.4.4"
sdk: ">=2.17.0 <=3.5.4"

dependencies:
############# Remove ###########
Expand Down Expand Up @@ -78,6 +78,7 @@ dependencies:
vibration: ^2.0.1
video_player: ^2.9.2
visibility_detector: ^0.4.0+2
win32: ^5.10.0

dev_dependencies:
build_runner: ^2.4.11
Expand Down
24 changes: 24 additions & 0 deletions test/service_tests/image_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ void main() {
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.original),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio3x2),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio4x3),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio16x9),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.square),
Expand All @@ -109,6 +121,18 @@ void main() {
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.original),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio3x2),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio4x3),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio16x9),
);
});

test("error in crop image", () async {
Expand Down

0 comments on commit 8e5de18

Please sign in to comment.