Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to put Firestore/Firebase in CoroutinesExample.kt (Kotlin) Project #397

Closed
neuberfran opened this issue Oct 17, 2024 · 0 comments
Closed

Comments

@neuberfran
Copy link

neuberfran commented Oct 17, 2024

Hi,

photo01

I stay trying this: https://firebase.google.com/docs/android/setup?hl=pt-br#kotlin+ktx

and I'm having the error on the screen above

Even if I try things like below(i.e. google-services directly) I get error

plugins {
    java
    kotlin("jvm") version "1.7.10"
    application
    google-services
}

group = "com.pi4j"
version = "0.2"

application {
    mainClass.set("CoroutinesExampleKt")
}

repositories {
    mavenCentral()
}

dependencies {
    // Import the Firebase BoM
    implementation(platform("com.google.firebase:firebase-bom:32.3.1"))

    // When using the BoM, you don't specify versions in Firebase library dependencies

    // Add the dependency for the Firebase SDK for Google Analytics
    implementation("com.google.firebase:firebase-analytics-ktx")

    // TODO: Add the dependencies for any other Firebase products you want to use
    // See https://firebase.google.com/docs/android/setup#available-libraries
    // For example, add the dependencies for Firebase Authentication and Cloud Firestore
    implementation("com.google.firebase:firebase-auth-ktx")
    implementation("com.google.firebase:firebase-firestore-ktx")
    // Esses abaixo vieram do jfran
    //implementation 'com.google.firebase:firebase-firestore:21.4.3'
    //implementation 'com.google.firebase:firebase-auth:19.3.1'
    val pi4jVersion: String by rootProject.extra
    val slf4jVersion: String by rootProject.extra
    val kotlinCoroutinesVersion: String by rootProject.extra
    implementation(project(":lib"))
    implementation("com.pi4j:pi4j-core:$pi4jVersion")
    implementation("com.pi4j:pi4j-plugin-raspberrypi:$pi4jVersion")
    implementation("com.pi4j:pi4j-plugin-pigpio:$pi4jVersion")
    implementation("com.pi4j:pi4j-plugin-gpiod:$pi4jVersion")
    implementation("com.pi4j:pi4j-plugin-linuxfs:$pi4jVersion")
    implementation("com.pi4j:pi4j-plugin-mock:$pi4jVersion")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")
    implementation("org.slf4j:slf4j-api:$slf4jVersion")
    implementation("org.slf4j:slf4j-simple:$slf4jVersion")
    testImplementation(kotlin("test"))
}

tasks.getByName<Test>("test") {
    useJUnitPlatform()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions.jvmTarget = "11"
}
@Pi4J Pi4J locked and limited conversation to collaborators Oct 18, 2024
@FDelporte FDelporte converted this issue into discussion #398 Oct 18, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant