How to configure GeckoView in Kotlin DSL project?

77 views Asked by At

I was following the official mozilla tutorial to setup GeckoView, but I couldn't get it right. The tutorial was using Groovy DSL, so I tried to convert each statement they told me into Kotlin DSL syntax. However, I got this error: "Failed to resolve: org.mozilla.geckoview:geckoview-nightly:70.0.20190712095934".

This is my settings.gradle.kts

pluginManagement {
    repositories {
        maven {
            setUrl("https://maven.mozilla.org/maven2/")
        }
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

This is my build.gradle.kts module level

plugins {
    ...
}

android {
    ...
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    ...
}

dependencies {
    ...

    // GeckoView
    implementation("org.mozilla.geckoview:geckoview-nightly:70.0.20190712095934")
}

I didn't define the ext block, because I'm not sure how the syntax works, instead I just set the version directly to the implementation.

0

There are 0 answers