This message was deleted.
# kotlin-dsl
s
This message was deleted.
p
You mean to convert it to Groovy I assume 🙂 This should do:
Copy code
tasks.withType(L8DexDesugarLibTask) {
  if (name.endsWith("AndroidTest")) {
    keepRulesConfigurations.set(["-dontobfuscate"])
    keepRulesConfigurations.set(["-keep class j$.** { *; }"])
  }
}
j
yes, Groovy, sorry. Thank you for your help! I tried copy/paste but it seems I have to use single quotes because of that
$
... I tried to sync the project and I got
Could not get unknown property 'L8DexDesugarLibTask'
... googled it I tried to add to the first line of my file
import com.android.build.gradle.internal.tasks.L8DexDesugarLibTask
... synching I get
unable to resolve class com.android.build.gradle.internal.tasks.L8DexDesugarLibTask
Any ideas ?
p
Ah right, I missed the
$
🙂 I don’t know about
L8DexDesugarLibTask
. What the error says is basically that it’s not in your script dependencies.
Kotlin or Groovy scripts would fail the same way here.
j
okay, thanks for the help. I will keep searching.