Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

125
Visualizações
Compile avoidance in multi module android application with databinding

As stated in various articles (example: Jetbrains blog) and official documentation, in order to speed up android app builds it is recommended to enable compile avoidance. In order to do so the following parameters have to be added to gradle.properties:

# positive value will enable caching
# use the same value as the number of modules that use kapt
kapt.classloaders.cache.size=5

# disable for caching to work
kapt.include.compile.classpath=false

And that is what I did. But if both of these parameters are in gradle.properties, then one of the modules with databinding randomly fails to compile stating that DataBindingImpl classes are missing. If I remove at least one of mentioned parameters - everything compiles without any issues.

Since I am cleaning all of the project and then rebuilding it - compile avoidance should be skipped, because theoretically all of the file contents are changed.

Is there something with databinding and compilation avoidance that is incompatible? I can't seem to find any information about this. Why with these flags DataBindingImpl classes stop generating?

Entire gradle.properties content:

org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 
org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
org.gradle.daemon=true
org.gradle.caching=true
kapt.incremental.apt=true
kapt.classloaders.cache.size=8
kapt.include.compile.classpath=false
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can add the following code in gradle.properties file to avoid getting errors for data binding

kapt.classloaders.cache.disableForProcessors=android.databinding.annotationprocessor.ProcessDataBinding
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda