we're encountering this error, <https://stackoverf...
# gradle
s
we're encountering this error, https://stackoverflow.com/questions/59303742/gradle-6-migration-settings-gradle-kts it appears that the api changed in 6. https://docs.gradle.org/current/userguide/upgrading_version_5.html
As part of the change, the SettingsScriptApi interface is no longer implemented by settings scripts and the InitScriptApi interface is no longer implemented by init scripts. They should be replaced with the corresponding model object interfaces, Settings and Gradle.
but we cannot figure out the new syntax. It doesn't appear that the Settings object has any way to access the gradle.properties variables, like it did before. and it also seems like
Copy code
pluginManagement {
    plugins {
no longer works either. Anyone know what to do here?
o
isn't that error just: https://docs.gradle.org/current/userguide/upgrading_version_5.html#the_pluginmanagement_block_in_settings_scripts_is_now_isolated
Now, they are executed earlier in a similar manner to buildscript {} or plugins {}. This means that code inside such a block cannot reference anything declared elsewhere in the script.
likely the fix is to move it inside the
pluginManagement
block
s
ah, that appears to be working. I read that differently than you did. So what exactly is happening here then? I don't really understand why it works in pluginManagement and not top level.
o
the code inside the
{}
is extracted as a separate script entirely
the same behavior occurs with buildscript/plugins, as stated
s
I see.
thanks for the help!