good anytime, could anyone suggest me how can I un...
# dsl
a
good anytime, could anyone suggest me how can I unit test logic in
buildSrc
folder?
g
You probably need #gradle channel This channel about writing of DSL in general You can create
test
source set in buildSrc, the same as for any other Java/Kotlin Gradle project, it will be run automatically on buildSrc compilation https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources
a
That was the problem, that it does not run
automatically
. I solved that now using
./gradlew -p buildSrc test
command call from my CI
g
It's strange, it's default behavior, are you sure that you configured it correctly? You can report to Gradle issue tracker if you have reproducible sample project
a
I will, thanks for mention this.
g
Also, keep in mind that test results for buildSrc are caches and test will not run if buildSrc or tests are not chamged
a
yes. I know that
@gildor I assume it should build once I make a
buildSrc
clean, right? But it did not run tests after that. Also I tried to modify the source files as well, same no results in build folder, nor logs in console. Will try to reflect it in sample project, lets see.