uber / okbuck

OkBuck is a gradle plugin that lets developers utilize the Buck build system on a gradle project.
Other
1.54k stars 168 forks source link

Does applying the plugin override the android gradle plugin version? #344

Closed Macarse closed 7 years ago

Macarse commented 7 years ago

I think the android gradle plugin version is getting override in my gradle cfg by the okBuck plugin.

My app is using GreenDao and I am hitting this issue: https://github.com/greenrobot/greenDAO/issues/498

After reading the issue, it looks like it should only happen with com.android.tools.build:gradle:2.3.0 and I am using com.android.tools.build:gradle:2.2.3

I have read https://github.com/uber/okbuck/blob/master/Usage.md but there is no way of overriding the android gradle plugin version.

Any idea?

kageiit commented 7 years ago

You can exclude it quite easily

classpath('com.uber:okbuck:0.14.4') {
  exclude module: 'gradle'
}

Then the android gradle plugin that is picked up transitively will be replaced by whatever you include in your project explictly

Macarse commented 7 years ago

@kageiit If you are offering a way to override build tools might make sense to add a way to override android gradle plugin version.

kageiit commented 7 years ago

That's what mentioned in my comment above. It does not make sense to have an extension for this (it's not possible even). Even if it was, the android gradle plugin is not used while running the buck build. Configuration exclude principles are a well documented gradle feature and can be used for the effect you originally desired.

Macarse commented 7 years ago

Just to make sure I understand correctly: You are saying that okBuck would not use the android gradle plugin?

kageiit commented 7 years ago

Okbuck would use the android gradle plugin, but it cannot be overridden from an extension container. The only way to override which version it uses would be to use a dependency exclusion or substitution rule as in the comment above

Macarse commented 7 years ago

@kageiit thanks for answering!