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
34 changes: 29 additions & 5 deletions packages/firebase_auth/firebase_auth/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ group 'io.flutter.plugins.firebase.auth'
version '1.0-SNAPSHOT'

apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

buildscript {
repositories {
Expand All @@ -10,13 +11,23 @@ buildscript {
}
}

allprojects {
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}

// AGP 9+ has built-in Kotlin support unless Flutter opts out via android.builtInKotlin=false.
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

def firebaseCoreProject = findProject(':firebase_core')
if (firebaseCoreProject == null) {
throw new GradleException('Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?')
Expand All @@ -36,16 +47,21 @@ android {
namespace 'io.flutter.plugins.firebase.auth'
}

compileSdkVersion 34
compileSdkVersion project.ext.compileSdk

defaultConfig {
minSdkVersion 23
minSdkVersion project.ext.minSdk
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.toVersion(17)
targetCompatibility JavaVersion.toVersion(17)
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
}

buildFeatures {
Expand All @@ -63,4 +79,12 @@ android {
}
}

plugins.withId("org.jetbrains.kotlin.android") {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
}

apply from: file("./user-agent.gradle")
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ext {
compileSdk=34
minSdk=23
targetSdk=34
javaVersion = JavaVersion.toVersion(17)
androidGradlePluginVersion = '8.3.0'
}

This file was deleted.

This file was deleted.

Loading
Loading