-
Couldn't load subscription status.
- Fork 23
Added support for compileSdk 36, latest AGP and Gradle versions #21
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,15 +2,15 @@ group 'carnegietechnologies.gallery_saver' | |||||||||
| version '1.0-SNAPSHOT' | ||||||||||
|
|
||||||||||
| buildscript { | ||||||||||
| ext.kotlin_version = '1.8.20' | ||||||||||
| ext.kotlinCoroutinesVersion = '1.6.4' | ||||||||||
| ext.kotlin_version = '2.2.20' | ||||||||||
| ext.kotlinCoroutinesVersion = '1.10.2' | ||||||||||
| repositories { | ||||||||||
| google() | ||||||||||
| mavenCentral() | ||||||||||
| } | ||||||||||
|
|
||||||||||
| dependencies { | ||||||||||
| classpath 'com.android.tools.build:gradle:8.1.0' | ||||||||||
| classpath 'com.android.tools.build:gradle:8.13.0' | ||||||||||
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
@@ -27,22 +27,22 @@ apply plugin: 'kotlin-android' | |||||||||
|
|
||||||||||
| android { | ||||||||||
| namespace "carnegietechnologies.gallery_saver" | ||||||||||
| compileSdkVersion 31 | ||||||||||
| compileSdkVersion 36 | ||||||||||
|
|
||||||||||
| compileOptions { | ||||||||||
| sourceCompatibility JavaVersion.VERSION_17 | ||||||||||
| targetCompatibility JavaVersion.VERSION_17 | ||||||||||
| sourceCompatibility JavaVersion.VERSION_21 | ||||||||||
| targetCompatibility JavaVersion.VERSION_21 | ||||||||||
| } | ||||||||||
|
|
||||||||||
| kotlinOptions { | ||||||||||
| jvmTarget = '17' | ||||||||||
| jvmTarget = JavaVersion.VERSION_21 | ||||||||||
| } | ||||||||||
|
Comment on lines
+38
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Optional: set jvmTarget as a string to avoid Groovy coercion surprises. - jvmTarget = JavaVersion.VERSION_21
+ jvmTarget = "21"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| sourceSets { | ||||||||||
| main.java.srcDirs += 'src/main/kotlin' | ||||||||||
| } | ||||||||||
| defaultConfig { | ||||||||||
| minSdkVersion 21 | ||||||||||
| minSdkVersion 24 | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainMin SDK raised to 24 — update plugin metadata too. Ensure the Flutter plugin’s pubspec under flutter.plugin.platforms.android.minSdkVersion is also set to 24, or consumers may get mismatched expectations. 🏁 Script executed: #!/bin/bash
# Locate plugin pubspec and confirm minSdkVersion advertised to users
fd -a pubspec.yaml
rg -nC2 'flutter:\s*plugin:|platforms:\s*android:|minSdkVersion' -n pubspec.yaml **/pubspec.yamlLength of output: 71 🏁 Script executed: #!/bin/bash
set -euo pipefail
files=(
/home/jailuser/git/example/pubspec.yaml
/home/jailuser/git/pubspec.yaml
)
for f in "${files[@]}"; do
if [ -f "$f" ]; then
echo "=== $f ==="
sed -n '1,240p' "$f" || true
echo "---- rg matches ----"
rg -nC2 'flutter:\s*plugin' "$f" || true
rg -nC2 'platforms:\s*android' "$f" || true
rg -nC2 'minSdkVersion' "$f" || true
else
echo "MISSING: $f"
fi
doneLength of output: 1248 Min SDK raised to 24 — update plugin pubspec android/build.gradle sets minSdkVersion to 24; add flutter.plugin.platforms.android.minSdkVersion: 24 to pubspec.yaml (repo root) so the plugin metadata matches. For example, under flutter.plugin.platforms.android add: 🤖 Prompt for AI Agents |
||||||||||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||||||||||
| } | ||||||||||
| lintOptions { | ||||||||||
|
|
@@ -52,18 +52,9 @@ android { | |||||||||
|
|
||||||||||
| dependencies { | ||||||||||
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stop using deprecated kotlin-stdlib-jdk7 with Kotlin 2.x. Use kotlin-stdlib (the jdk7 artifact has been folded/deprecated for a long time). - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| api 'androidx.core:core-ktx:1.5.0' | ||||||||||
| api 'androidx.core:core-ktx:1.17.0' | ||||||||||
| api 'androidx.legacy:legacy-support-v4:1.0.0' | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick 🧩 Analysis chainlegacy-support-v4 is obsolete on minSdk 24; avoid leaking via API. If not strictly needed, remove it. If needed but not part of your public API, use implementation. Verify usage before changing. Potential change: - api 'androidx.legacy:legacy-support-v4:1.0.0'
+ // TODO: remove if unused; otherwise prefer implementation to avoid leaking it
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'🏁 Script executed: #!/bin/bash
# Find usages and API leaks of legacy support types
rg -n -C2 'androidx\.legacy' android | sed -n '1,200p'
# Check if any public API references legacy packages (Kotlin/Java)
rg -nP -C2 'public\s+.*(androidx\.legacy\.)' android || trueLength of output: 442 Replace api with implementation for androidx.legacy:legacy-support-v4 Only occurrence is the declaration in android/build.gradle:56 and no public API references were found — switch to implementation to avoid leaking the legacy library. - api 'androidx.legacy:legacy-support-v4:1.0.0'
+ // TODO: remove if unused; otherwise prefer implementation to avoid leaking it
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| implementation 'androidx.exifinterface:exifinterface:1.3.2' | ||||||||||
| implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion" | ||||||||||
| implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion" | ||||||||||
| } | ||||||||||
|
|
||||||||||
| dependencies { | ||||||||||
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||||||||||
| api 'androidx.core:core-ktx:1.5.0' | ||||||||||
| api 'androidx.legacy:legacy-support-v4:1.0.0' | ||||||||||
| implementation 'androidx.exifinterface:exifinterface:1.3.2' | ||||||||||
| implementation 'androidx.exifinterface:exifinterface:1.4.1' | ||||||||||
| implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion" | ||||||||||
| implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion" | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,25 +7,25 @@ plugins { | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| android { | ||||||||||||||||||||||||||||||||
| namespace = "com.example.example" | ||||||||||||||||||||||||||||||||
| compileSdk = flutter.compileSdkVersion | ||||||||||||||||||||||||||||||||
| compileSdk = 36 | ||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick compileSdk 36 — good. Verify NDK and CI JDK toolchains. No action needed beyond ensuring CI images include Android API 36 and JDK 21. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
| ndkVersion = flutter.ndkVersion | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| compileOptions { | ||||||||||||||||||||||||||||||||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||||||||||||||||||||||||||||||||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||||||||||||||||||||||||||||||||
| sourceCompatibility JavaVersion.VERSION_21 | ||||||||||||||||||||||||||||||||
| targetCompatibility JavaVersion.VERSION_21 | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| kotlinOptions { | ||||||||||||||||||||||||||||||||
| jvmTarget = JavaVersion.VERSION_1_8 | ||||||||||||||||||||||||||||||||
| jvmTarget = JavaVersion.VERSION_21 | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
Comment on lines
+14
to
20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Optional: use string for jvmTarget. - jvmTarget = JavaVersion.VERSION_21
+ jvmTarget = "21"📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| defaultConfig { | ||||||||||||||||||||||||||||||||
| // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||||||||||||||||||||||||||||||||
| applicationId = "com.example.example" | ||||||||||||||||||||||||||||||||
| // You can update the following values to match your application needs. | ||||||||||||||||||||||||||||||||
| // For more information, see: https://flutter.dev/to/review-gradle-config. | ||||||||||||||||||||||||||||||||
| minSdk = flutter.minSdkVersion | ||||||||||||||||||||||||||||||||
| targetSdk = flutter.targetSdkVersion | ||||||||||||||||||||||||||||||||
| minSdkVersion 24 | ||||||||||||||||||||||||||||||||
| targetSdkVersion 36 | ||||||||||||||||||||||||||||||||
| versionCode = flutter.versionCode | ||||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Optional: use modern DSL for SDK levels. Groovy supports both, but aligning with property names improves readability. - minSdkVersion 24
- targetSdkVersion 36
+ minSdk 24
+ targetSdk 36📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
| versionName = flutter.versionName | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick
Optional: modernise to compileSdk (property) for consistency.
📝 Committable suggestion
🤖 Prompt for AI Agents