After updating Gradle from 5.6.4 to 6.0.1, we faced the problem that settings.gradle.kts
doesn’t see imports
from buildSrc
module.
For reproducing this issue I have created the sample project.
Gradle 5.6.4 - works as expected gradle_5.6.4
Gradle 6.0.1 (also 6.1-rc-2) - sync issue gradle_6.0.1
Error message: e: C:\projects\GradleSample\settings.gradle.kts:4:20: Unresolved reference: APP_NAME
Storing common constants and logic in buildSrc
module are very critical for our project.
Best regards,
Aliaksei Shvants
1 Like
Based on https://docs.gradle.org/current/userguide/upgrading_version_5.html#classes_from_buildsrc_are_no_longer_visible_to_settings_scripts
we are not able to have a reference on buildSrc module. This is breaking change and open question how to fix this problem.
emign
(Nico)
March 11, 2020, 7:48am
3
egorikftp:
breaking
I am injecting a dependency via a gradle plugin. (see github code here)
The consuming project (the one integrating the plugin) loses the dependencies when switching form 5.6.4 to 6.0+: Is this due to the change you mentions @egorikftp ?