6

Groovy ベースのスクリプトを Kotlin に移行中です。特定のフレーバーの依存関係を追加する方法がわからないことを除いて、ほとんどのことを行うことができました。これは、これまでの Kotlin DSL ではどのように見えるかですが、なぜ freeImplementation("bar:2.2.8")

 productFlavors {
    create("free") {
         ...
         ...
    }
    create("paid") {
        ...
        ...
    }
}

dependencies {

    implementation("foo:1.2.0")

    // This is not working when migrated to Kotlin DSL
    freeImplementation("bar:2.2.8")

    //Below was the code in Groovy which was working fine earlier 
    //freeImplementation "bar:2.2.8"

}
4

1 に答える 1