Skip to content

Commit

Permalink
Merge branch 'develop-fix' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
einsitang committed Aug 25, 2024
2 parents 89f1495 + 355df1c commit e974046
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 66 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ about contributing please read [CONTRIBUTING.md](CONTRIBUTING.md)
## environment
- dart SDK: '>=3.0.0 <3.5.0' // records feature support
- flutter SDK: '^3.0.0'
- jdk 11
- jdk 17 with Gradle Plugin 8.1.1 :new:

## dependency
- [opencv_dart](https://github.com/rainyl/opencv_dart)
Expand Down
28 changes: 10 additions & 18 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "org.jetbrains.kotlin.android"
id "com.google.gms.google-services"
id "com.google.firebase.crashlytics"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
Expand All @@ -7,10 +14,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')
if (flutterVersionCode == null) {
Expand All @@ -22,22 +25,14 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "com.sevlow.app.sudoku"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

sourceSets {
Expand Down Expand Up @@ -98,6 +93,3 @@ flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
16 changes: 15 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
-keep class io.flutter.plugins.** { *; }

-dontwarn com.google.android.play.core.splitcompat.SplitCompatApplication
-dontwarn com.google.android.play.core.splitinstall.SplitInstallException
-dontwarn com.google.android.play.core.splitinstall.SplitInstallManager
-dontwarn com.google.android.play.core.splitinstall.SplitInstallManagerFactory
-dontwarn com.google.android.play.core.splitinstall.SplitInstallRequest$Builder
-dontwarn com.google.android.play.core.splitinstall.SplitInstallRequest
-dontwarn com.google.android.play.core.splitinstall.SplitInstallSessionState
-dontwarn com.google.android.play.core.splitinstall.SplitInstallStateUpdatedListener
-dontwarn com.google.android.play.core.tasks.OnFailureListener
-dontwarn com.google.android.play.core.tasks.OnSuccessListener
-dontwarn com.google.android.play.core.tasks.Task
-dontwarn org.tensorflow.lite.gpu.GpuDelegateFactory$Options$GpuBackend
-dontwarn org.tensorflow.lite.gpu.GpuDelegateFactory$Options
20 changes: 0 additions & 20 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
buildscript {
// ext.kotlin_version = '1.3.61'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:perf-plugin:1.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.4'
// END: FlutterFire Configuration
// classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx2048M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Expand Down
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
34 changes: 23 additions & 11 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

include ':app'
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.1" apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
id "com.google.gms.google-services" version "4.4.0" apply false
id "com.google.firebase.crashlytics" version "2.9.9" apply false
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
include ':app'
4 changes: 2 additions & 2 deletions codemagic.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
workflows:
sudoku-flutter-workflow:
environment:
java: 11
java: 17
flutter: 3.22.3
android_signing:
- ANDROID_KEYJKS
Expand All @@ -10,7 +10,7 @@ workflows:
scripts:
- name: build apk with flutter
script: |
flutter pub get
export OPENCV_DART_ANDROID_ENABLED_ABI="arm64-v8a,armeabi-v7a"
flutter build apk --release --target-platform=android-arm,android-arm64
Expand Down
11 changes: 6 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ packages:
source: hosted
version: "0.11.0+1"
camera_android_camerax:
dependency: transitive
dependency: "direct main"
description:
name: camera_android_camerax
sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780"
Expand Down Expand Up @@ -608,10 +608,11 @@ packages:
opencv_dart:
dependency: "direct main"
description:
name: opencv_dart
sha256: b45d822988a852ba9c58f092b8003720c13a0bc98906803173a880f06205980b
url: "https://pub.flutter-io.cn"
source: hosted
path: "."
ref: "452994e8868b4d1f547d515cb89b53f0037840ec"
resolved-ref: "452994e8868b4d1f547d515cb89b53f0037840ec"
url: "https://github.com/einsitang/opencv_dart.git"
source: git
version: "1.2.2"
package_config:
dependency: transitive
Expand Down
13 changes: 7 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.0.1+1
version: 2.1.0+1

environment:
sdk: '>=3.0.0 <3.5.0'
Expand Down Expand Up @@ -45,17 +45,18 @@ dependencies:
cupertino_icons: ^1.0.5
url_launcher: ^6.1.7
just_audio: ^0.9.39
camera_android_camerax: 0.6.7+2
camera: 0.11.0+1
path_provider: ^2.1.3
path: ^1.9.0
image: ^4.2.0
yaml: ^3.1.2
tflite_flutter: 0.10.4
opencv_dart: 1.2.2
# opencv_dart:
# git:
# url: https://github.com/einsitang/opencv_dart.git
# ref: 47a80d918a466e4317232b12b225cefcf7f20e6e
# opencv_dart: 1.2.2
opencv_dart:
git:
url: https://github.com/einsitang/opencv_dart.git
ref: 452994e8868b4d1f547d515cb89b53f0037840ec
firebase_core: ^3.3.0
firebase_crashlytics: ^4.0.4
firebase_analytics: ^11.2.1
Expand Down

0 comments on commit e974046

Please sign in to comment.