Skip to content
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
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
applicationId "com.codeheadsystems.simple_otp"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
24 changes: 24 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"

if (project.name != 'app') {
// Apply Kotlin plugin to all plugins if they have Kotlin source files
if (project.name == 'file_picker') {
apply plugin: 'kotlin-android'
}

afterEvaluate {
if (project.hasProperty('android')) {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "21"
}
}
}
}
}
}
subprojects {
project.evaluationDependsOn(':app')
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.3.2' apply false
id "com.android.application" version '8.6.0' apply false
id "org.jetbrains.kotlin.android" version "2.1.20" apply false
}

Expand Down
4 changes: 2 additions & 2 deletions lib/routes/database_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DatabaseRoute extends StatelessWidget {

void doExport(final SecretList secretList) {
final String json = OTPSecret.writeToJSON(secretList.otpSecrets);
FilePicker.platform
FilePicker
.saveFile(
fileName: 'simple_otp.json',
allowedExtensions: ['json'],
Expand All @@ -117,7 +117,7 @@ class DatabaseRoute extends StatelessWidget {
void doImport(
final SecretList secretList, final void Function(Object) onError) async {
try {
FilePickerResult? result = await FilePicker.platform.pickFiles(
FilePickerResult? result = await FilePicker.pickFiles(
allowedExtensions: ['json', 'jsn'],
);
if (result != null &&
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: d974b6ba2606371ac71dd94254beefb6fa81185bde0b59bdc1df09885da85fde
sha256: b9c6bbfe174bcc1ec1e3a0de92e9b839fe553a46dd91862debfbbb5055ca876f
url: "https://pub.dev"
source: hosted
version: "10.3.8"
version: "10.3.9"
fixnum:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
file_picker: ^10.3.8
file_picker: ^10.3.9
http: ^1.6.0

dev_dependencies:
Expand Down