Hello :wave: I’m getting a message of no java heap space ```* What went wrong: Execution failed for ...
o
Hello 👋 I’m getting a message of no java heap space
Copy code
* What went wrong:
Execution failed for task ':app:runKtlintCheckOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > Java heap space
I found this issue with a possible solution but I still can’t make it work… where should I add it? Thanks in advance
Why I try to add it, I receive a
Copy code
> No such property: java for class: org.jlleitschuh.gradle.ktlint.tasks.BaseKtLintCheckTask
  Possible solutions: path, ant, name
r
you could try
Copy code
tasks.withType<org.jlleitschuh.gradle.ktlint.tasks.BaseKtLintCheckTask>().configureEach {
    it.workerMaxHeapSize.set("512mb")
}
👌 1
o
I couldn’t compile because of the
()
but using
Copy code
tasks.withType(org.jlleitschuh.gradle.ktlint.tasks.BaseKtLintCheckTask)
I got
Copy code
Execution failed for task ':app:runKtlintCheckOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > Cannot parse heap size: 512mb
btw, I’m using
Copy code
ktlint = '0.41.0'
ktlint_gradle = '10.0.0'
r
@orafaaraujo try
512m
o
oh, per-fect! Thank you, @romtsn 😄
👍 1
t
I need to add it into project readme. You are not the first asking about it 😅 BTW - how many Kotlin files you app module has?
o
In module
:app
: 1252 (
find app/ -name "*.kt" | wc -l
) it’s a “monolithic” one and there are a lot of unformatted files
🙏 1
We are running the auto format by package, to reduce the report
314 Views