Skip to content
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

Custom Build Variant not working in Kotlin DSL #1288

Open
erikgunawan opened this issue Sep 24, 2024 · 3 comments
Open

Custom Build Variant not working in Kotlin DSL #1288

erikgunawan opened this issue Sep 24, 2024 · 3 comments

Comments

@erikgunawan
Copy link

✍️ Describe the bug

I have 3 build variants: debug, beta, release

Here are the chucker implementations:

  debugImplementation "com.github.chuckerteam.chucker:library:3.5.2"
  betaImplementation "com.github.chuckerteam.chucker:library:3.5.2"
  releaseImplementation 'com.github.chuckerteam.chucker:library-no-op:3.5.2'

And then I tried to migrate the build configuration from Groovy to Kotlin DSL, so I changed the implementations to these:

debugImplementation(libs.chucker)
betaImplementation(libs.chucker)
releaseImplementation(libs.chucker.no.op)

After that, when building the apps, I got this warning:

Unresolved reference: betaImplementation

I have tried some options, but none of them work

add("beta", libs.chucker)

"betaImplementation"(libs.chucker)

@cortinico
Copy link
Member

"betaImplementation"(libs.chucker)

This is the correct syntax for Kotlin DSL and should work.

@erikgunawan
Copy link
Author

"betaImplementation"(libs.chucker)

This is the correct syntax for Kotlin DSL and should work.

It doesn't work, Chucker notification doesn't appear.

@cortinico
Copy link
Member

It doesn't work, Chucker notification doesn't appear.

Then please provide a reproducer using this template:
https://github.com/cortinico/kotlin-android-template

and I'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants