Skip to content
Open
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
24 changes: 15 additions & 9 deletions packages/cloud_functions/cloud_functions/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ version '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -61,12 +65,6 @@ android {
targetCompatibility project.ext.javaVersion
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
Expand All @@ -90,4 +88,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")
22 changes: 14 additions & 8 deletions packages/firebase_ai/firebase_ai/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ version '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand All @@ -33,12 +37,6 @@ android {
targetCompatibility project.ext.javaVersion
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
}
Expand All @@ -47,3 +45,11 @@ android {
disable 'InvalidPackage'
}
}

plugins.withId("org.jetbrains.kotlin.android") {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"
repositories {
google()
mavenCentral()
Expand All @@ -26,9 +26,13 @@ rootProject.allprojects {

apply plugin: 'com.android.library'

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand Down Expand Up @@ -58,12 +62,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

compileOptions {
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
Expand All @@ -90,4 +88,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
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"
repositories {
google()
mavenCentral()
Expand All @@ -19,9 +19,13 @@ rootProject.allprojects {
}
}

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand Down Expand Up @@ -51,12 +55,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

compileOptions {
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
Expand Down Expand Up @@ -84,4 +82,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")
22 changes: 14 additions & 8 deletions packages/firebase_database/firebase_database/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ version '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand Down Expand Up @@ -55,12 +59,6 @@ android {
targetCompatibility project.ext.javaVersion
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

sourceSets {
main {
java {
Expand All @@ -85,5 +83,13 @@ 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
Expand Up @@ -4,14 +4,18 @@ version '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"

repositories {
google()
Expand Down Expand Up @@ -60,12 +64,6 @@ android {
targetCompatibility project.ext.javaVersion
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
Expand All @@ -87,4 +85,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
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"
repositories {
google()
mavenCentral()
Expand All @@ -19,9 +19,13 @@ rootProject.allprojects {
}
}

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand Down Expand Up @@ -51,12 +55,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

compileOptions {
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
Expand All @@ -83,4 +81,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")
24 changes: 15 additions & 9 deletions packages/firebase_storage/firebase_storage/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.0.0"
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -44,9 +44,13 @@ def getRootProjectExtOrCoreProperty(name, firebaseCoreProject) {
return rootProject.ext.get('FlutterFire').get(name)
}

// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
// 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
if (agpMajor < 9) {
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

Expand All @@ -63,12 +67,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

if (agpMajor < 9) {
kotlinOptions {
jvmTarget = project.ext.javaVersion
}
}

compileOptions {
sourceCompatibility project.ext.javaVersion
targetCompatibility project.ext.javaVersion
Expand All @@ -95,4 +93,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")
Loading