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
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
18 changes: 4 additions & 14 deletions firebase-ai/firebase-ai.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@file:Suppress("UnstableApiUsage")

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

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

// 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 {
if (!name.contains("test", ignoreCase = true)) {
if (!kotlinOptions.freeCompilerArgs.contains("-Xexplicit-api=strict")) {
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
}
}
kotlin {
compilerOptions { jvmTarget = JvmTarget.JVM_1_8 }
explicitApi()
}

dependencies {
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
15 changes: 1 addition & 14 deletions firebase-dataconnect/connectors/connectors.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

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

plugins {
id("com.android.library")
Expand Down Expand Up @@ -70,6 +68,7 @@ kotlin {
jvmTarget = JvmTarget.JVM_1_8
optIn.add("kotlin.RequiresOptIn")
}
explicitApi()
}

dependencies {
Expand Down Expand Up @@ -100,15 +99,3 @@ dependencies {
androidTestImplementation(libs.truth.liteproto.extension)
androidTestImplementation(libs.turbine)
}

// 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<KotlinJvmCompile>().configureEach {
if (!name.contains("test", ignoreCase = true)) {
compilerOptions.freeCompilerArgs.add("-Xexplicit-api=strict")
}
}
15 changes: 1 addition & 14 deletions firebase-dataconnect/firebase-dataconnect.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

import com.google.firebase.dataconnect.gradle.plugin.DataConnectExecutableVersionsRegistry
import com.google.firebase.dataconnect.gradle.plugin.UpdateDataConnectExecutableVersionsTask
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id("firebase-library")
Expand Down Expand Up @@ -81,6 +79,7 @@ kotlin {
jvmTarget = JvmTarget.JVM_1_8
optIn.add("kotlin.RequiresOptIn")
}
explicitApi()
}

protobuf {
Expand Down Expand Up @@ -155,18 +154,6 @@ dependencies {
androidTestImplementation(libs.turbine)
}

// 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<KotlinJvmCompile>().configureEach {
if (!name.contains("test", ignoreCase = true)) {
compilerOptions.freeCompilerArgs.add("-Xexplicit-api=strict")
}
}

// Registers a Gradle task that updates the JSON file that stores the list of Data Connect
// executable versions. The task gets the list of all versions from the Internet and then
// updates the JSON file with their sizes and hashes.
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
Loading
Loading