Hi! Has anyone figured out how to truly disable Li...
# compose-android
s
Hi! Has anyone figured out how to truly disable LiveLiterals? Using:
Copy code
freeCompilerArgs += [
        "-P",
        "plugin:androidx.compose.compiler.plugins.kotlin:liveLiterals=false",
]
results in
e: Multiple values are not allowed for plugin option androidx.compose.compiler.plugins.kotlin:liveLiterals
While:
Copy code
freeCompilerArgs += [
        "-P",
        "plugin:androidx.compose.compiler.plugins.kotlin:liveLiteralsEnabled=false"
      ]
does not seem to work at all - LiveLiterals classes are still being generated.
1
Hopefully you won't mind me pinging you @Ben Trengrove [G] 😅
Ok - it seems that you can just do this, without using any flags
Copy code
android {
  composeOptions {
    useLiveLiterals false
  }
}
👀 1
Had an issue where some feature modules would have both Apollo-generated queries and Compose enabled. This would result in absolutely huge LiveLiterals classes being generated and compiled for those Apollo classes (1,7MB class file, 80k lines of decompiled code), slowing down build times significantly. A proper solution for this is to split those bigger modules into smaller ones but since none of us is using LiveLiterals right now we can just disable the feature altogether and reap the benefits.
b
Your fix is correct, AGP overrides that flag you are setting (which is a bit confusing)
🙇 1