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
67 changes: 17 additions & 50 deletions sample_app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,34 @@
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id "com.google.gms.google-services"
// END: FlutterFire Configuration
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}


def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

android {
namespace "io.getstream.chat.android.flutter.sample"
compileSdkVersion flutter.compileSdkVersion
ndkVersion "27.0.12077973"

compileSdkVersion 35

ndkVersion "26.2.11394342"

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}

lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}

defaultConfig {
applicationId "io.getstream.chat.android.flutter.sample"
minSdkVersion 23
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}

// Added this block:
afterEvaluate { project ->
if (project.hasProperty("kotlin")) {
project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
minSdkVersion Math.max(flutter.minSdkVersion, 23)
targetSdkVersion flutter.targetSdkVersion
versionCode flutter.versionCode
versionName flutter.versionName
}

signingConfigs {
Expand Down Expand Up @@ -93,5 +60,5 @@ flutter {
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}
Loading
Loading