Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
33 changes: 28 additions & 5 deletions flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ if (flutterVersionName == null) {
}

android {
namespace "org.mlcommons.android.mlperfbench"
compileSdkVersion 34

ndkVersion "25.2.9519653"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -50,6 +53,7 @@ android {

ndk {
abiFilters "arm64-v8a", "armeabi-v7a"
debugSymbolLevel 'SYMBOL_TABLE'
}
}

Expand All @@ -75,11 +79,15 @@ android {
// By default we do not upload mapping file to Firebase
firebaseCrashlytics {
if (System.env['FIREBASE_CRASHLYTICS_ENABLED'] == 'true') {
println 'mappingFileUploadEnabled set to true'
println 'mappingFileUploadEnabled and nativeSymbolUploadEnabled set to true'
mappingFileUploadEnabled true
nativeSymbolUploadEnabled true
unstrippedNativeLibsDir file("${buildDir}/intermediates/merged_native_libs/release/out/lib/")
symbolGeneratorType "csym"
} else {
println 'mappingFileUploadEnabled set to false'
println 'mappingFileUploadEnabled and nativeSymbolUploadEnabled set to false'
mappingFileUploadEnabled false
nativeSymbolUploadEnabled false
}
}
}
Expand All @@ -95,9 +103,24 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

// firebase-bom v32.8.1 is required to use minSdkVersion 21
// https://firebase.google.com/support/release-notes/android#2024-05-02
implementation(platform("com.google.firebase:firebase-bom:32.8.1"))
// https://firebase.google.com/support/release-notes/android
implementation(platform("com.google.firebase:firebase-bom:33.16.0"))
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-appcheck-playintegrity")
implementation("com.google.firebase:firebase-appcheck-debug")
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-crashlytics-ndk")
}

afterEvaluate {
if (System.env['FIREBASE_CRASHLYTICS_ENABLED'] == 'true') {
tasks.named('generateCrashlyticsSymbolFileRelease') {
dependsOn 'mergeReleaseNativeLibs'
}
tasks.configureEach {
if (name == 'assembleRelease' || name == 'bundleRelease') {
finalizedBy 'uploadCrashlyticsSymbolFileRelease'
}
}
}
}
9 changes: 9 additions & 0 deletions flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
project.evaluationDependsOn(':app')
}

Expand Down
3 changes: 1 addition & 2 deletions flutter/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=true
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
2 changes: 1 addition & 1 deletion flutter/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
8 changes: 4 additions & 4 deletions flutter/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.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
id "com.android.application" version "8.1.4" apply false
id "org.jetbrains.kotlin.android" version "1.9.25" apply false
id "com.google.gms.google-services" version "4.4.3" apply false
id "com.google.firebase.crashlytics" version "3.0.5" apply false
}

include ":app"
Loading