diff --git a/analysis_options.yaml b/analysis_options.yaml index 7c5e498..5e9b851 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -126,7 +126,6 @@ linter: # - one_member_abstracts # too many false positives # - only_throw_errors # https://github.com/flutter/flutter/issues/5792 - overridden_fields - - package_api_docs # - package_names # non conforming packages in sdk - package_prefixed_library_names # - parameter_assignments # we do this commonly diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 706ad40..d21736b 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,10 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -8,7 +15,6 @@ if (localPropertiesFile.exists()) { def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') @@ -21,35 +27,31 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 30 + namespace = "com.liugl.stack_board_example" + compileSdk = 35 + ndkVersion = "27.1.12297006" compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } - + kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = "21" } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.liugl.stack_board_example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + applicationId = "com.liugl.stack_board_example" + minSdk = 24 + targetSdk = 35 + versionCode = flutter.versionCode + versionName = flutter.versionName + ndk { + abiFilters 'armeabi-v7a', 'arm64-v8a' + } } - + buildTypes { release { // TODO: Add your own signing config for the release build. @@ -64,5 +66,8 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} + implementation "androidx.core:core-splashscreen:1.0.1" + implementation 'androidx.core:core-ktx:1.13.1' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' + implementation "androidx.work:work-runtime-ktx:2.9.1" +} \ No newline at end of file diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 568e0d8..f60818c 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -9,7 +9,8 @@ android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" - android:windowSoftInputMode="adjustResize"> + android:windowSoftInputMode="adjustResize" + android:exported="true" >