What is the difference between ThisBuild and Global scopes?

前端 未结 2 816
面向向阳花
面向向阳花 2020-12-08 06:58

Can someone explain me the difference between writing these 2 lines:

resolvers in ThisBuild ++= appResolvers

resolvers in Global ++= appResolvers

2条回答
  •  失恋的感觉
    2020-12-08 07:15

    This would probably be used in a plugin:

    resolvers in Global ++= appResolvers
    

    Whereas this could appear in your build definition:

    resolvers in ThisBuild ++= appResolvers
    

    thereby letting you override global default offered by plugin.

    Within the same build definition, using either one will most likely have equivalent effect, because they are the bottom two in the delegates list.

提交回复
热议问题