Skip to content

Commit

Permalink
fixing android build - reverted workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Jha committed Jan 9, 2025
1 parent 5637506 commit c586027
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 11 deletions.
8 changes: 6 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}

compileSdkVersion 35
compileSdk 35
namespace "com.example.talawa"
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -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 @@ -74,5 +76,7 @@ flutter {

dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.10"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22"
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.7.1' 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
12 changes: 6 additions & 6 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 @@ -1685,10 +1685,10 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: "7f8f25d7ad56819a82b2948357f3c3af071f6a678db33833b26ec36bbc221316"
sha256: e343701aa890b74a863fa460f5c0e628127ed06a975d7d9af6b697133fb25bdf
url: "https://pub.dev"
source: hosted
version: "2.4.11"
version: "2.7.1"
video_player_avfoundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1757,10 +1757,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.5.4"
win32_registry:
dependency: transitive
description:
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 c586027

Please sign in to comment.