Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
5 changes: 4 additions & 1 deletion appcheck/firebase-appcheck/firebase-appcheck.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id("kotlin-android")
Expand Down Expand Up @@ -43,10 +45,11 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
testOptions.unitTests.includeAndroidResources = true
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
javadocClasspath libs.autovalue.annotations

Expand Down
9 changes: 5 additions & 4 deletions encoders/firebase-encoders-json/firebase-encoders-json.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id 'kotlin-android'
}

firebaseLibrary {
publishJavadoc = false
releaseNotes {
releaseNotes {
enabled.set(false)
}
}
Expand All @@ -38,16 +40,15 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
api 'com.google.firebase:firebase-encoders:17.0.0'

Expand Down
12 changes: 6 additions & 6 deletions firebase-ai/firebase-ai.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

@file:Suppress("UnstableApiUsage")

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id("firebase-library")
Expand Down Expand Up @@ -55,7 +56,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
testOptions {
targetSdk = targetSdkVersion
unitTests {
Expand All @@ -73,17 +73,17 @@ android {
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
// classes, methods, or properties have implicit `public` visibility. This check helps
// avoid accidentally leaking elements into the public API, requiring that any public
// element be explicitly declared as `public`.
// https://github.com/Kotlin/KEEP/blob/master/proposals/explicit-api-mode.md
// https://chao2zhang.medium.com/explicit-api-mode-for-kotlin-on-android-b8264fdd76d1
tasks.withType<KotlinCompile>().all {
tasks.withType<KotlinJvmCompile>().configureEach {
if (!name.contains("test", ignoreCase = true)) {
if (!kotlinOptions.freeCompilerArgs.contains("-Xexplicit-api=strict")) {
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
}
compilerOptions.freeCompilerArgs.add("-Xexplicit-api=strict")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id("kotlin-android")
Expand Down Expand Up @@ -41,16 +43,15 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
api libs.playservices.tasks
api(libs.firebase.common)
Expand Down
5 changes: 2 additions & 3 deletions firebase-appdistribution/test-app/test-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
// TODO(rachelprince): Add flag to build with public version of SDK
println("Building with HEAD version ':firebase-appdistribution' of SDK")
Expand Down
5 changes: 4 additions & 1 deletion firebase-common/firebase-common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("firebase-library")
id("kotlin-android")
Expand Down Expand Up @@ -44,14 +46,15 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
testOptions {
targetSdk = targetSdkVersion
unitTests { isIncludeAndroidResources = true }
}
lint { targetSdk = targetSdkVersion }
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
api(libs.kotlin.coroutines.tasks)

Expand Down
7 changes: 4 additions & 3 deletions firebase-config/bandwagoner/bandwagoner.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

apply plugin: 'com.android.application'
apply plugin: com.google.firebase.gradle.plugins.ci.device.FirebaseTestLabPlugin
apply plugin: 'org.jetbrains.kotlin.android'
Expand Down Expand Up @@ -58,11 +60,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

firebaseTestLab {
device 'model=panther,version=33,locale=en,orientation=portrait'
}
Expand Down
6 changes: 4 additions & 2 deletions firebase-config/firebase-config.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("firebase-library")
id("kotlin-android")
Expand Down Expand Up @@ -49,15 +51,15 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions { jvmTarget = "1.8" }

testOptions {
targetSdk = targetSdkVersion
unitTests { isIncludeAndroidResources = true }
}
lint { targetSdk = targetSdkVersion }
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
// Firebase
api("com.google.firebase:firebase-config-interop:16.0.1")
Expand Down
9 changes: 5 additions & 4 deletions firebase-config/test-app/test-app.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
@file:Suppress("DEPRECATION") // App projects should still use FirebaseTestLabPlugin.

import com.google.firebase.gradle.plugins.ci.device.FirebaseTestLabPlugin

/*
* Copyright 2023 Google LLC
*
Expand All @@ -18,6 +15,9 @@ import com.google.firebase.gradle.plugins.ci.device.FirebaseTestLabPlugin
* limitations under the License.
*/

import com.google.firebase.gradle.plugins.ci.device.FirebaseTestLabPlugin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
Expand Down Expand Up @@ -47,9 +47,10 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
implementation(project(":firebase-crashlytics")) {
exclude(group = "com.google.firebase", module = "firebase-config-interop")
Expand Down
7 changes: 4 additions & 3 deletions firebase-crashlytics/firebase-crashlytics.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id("kotlin-android")
Expand Down Expand Up @@ -56,11 +58,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

thirdPartyLicenses {
add 'Tape', "${projectDir}/third_party_licenses/tape/LICENSE"
}
Expand Down
5 changes: 4 additions & 1 deletion firebase-database/firebase-database.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("firebase-library")
id("kotlin-android")
Expand Down Expand Up @@ -52,7 +54,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }

packagingOptions.resources.excludes += "META-INF/DEPENDENCIES"

Expand All @@ -64,6 +65,8 @@ android {
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

dependencies {
api("com.google.firebase:firebase-appcheck-interop:17.1.0")
api(libs.firebase.common)
Expand Down
5 changes: 4 additions & 1 deletion firebase-firestore/firebase-firestore.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id("kotlin-android")
Expand Down Expand Up @@ -108,11 +110,12 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
testOptions.unitTests.includeAndroidResources = true

}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
Expand Down
14 changes: 7 additions & 7 deletions firebase-functions/firebase-functions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,6 +12,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id("firebase-library")
id("kotlin-android")
Expand Down Expand Up @@ -49,25 +50,24 @@ android {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
testOptions {
targetSdk = targetSdkVersion
unitTests { isIncludeAndroidResources = true }
}
lint { targetSdk = targetSdkVersion }
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
// classes, methods, or properties have implicit `public` visibility. This check helps
// avoid accidentally leaking elements into the public API, requiring that any public
// element be explicitly declared as `public`.
// https://github.com/Kotlin/KEEP/blob/master/proposals/explicit-api-mode.md
// https://chao2zhang.medium.com/explicit-api-mode-for-kotlin-on-android-b8264fdd76d1
tasks.withType<KotlinCompile>().all {
tasks.withType<KotlinJvmCompile>().configureEach {
if (!name.contains("test", ignoreCase = true)) {
if (!kotlinOptions.freeCompilerArgs.contains("-Xexplicit-api=strict")) {
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
}
compilerOptions.freeCompilerArgs.add("-Xexplicit-api=strict")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'firebase-library'
id("kotlin-android")
Expand Down Expand Up @@ -55,7 +57,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }

sourceSets {
androidTest {
Expand All @@ -77,6 +78,7 @@ android {
}
}

kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_1_8 } }

thirdPartyLicenses {
add 'Dagger', "${rootDir}/third_party/licenses/apache-2.0.txt"
Expand Down
Loading
Loading