keeper icon indicating copy to clipboard operation
keeper copied to clipboard

[Documentation] `beforeVariants` syntax for Groovy

Open juliocbcotta opened this issue 2 years ago • 1 comments

Hello there, it seems that this

androidComponents {
  beforeVariants { builder ->
    if (shouldRunKeeperOnVariant(builder)) {
      builder.registerExtension(KeeperVariantMarker.class, KeeperVariantMarker.INSTANCE)
    }
  }
}

does not work with AGP 7.1.2, but

androidComponents {
  beforeVariants(selector().all()) { builder ->
      // NOTE: You need to define this method or use a build flag, see configuration section.
    if (shouldRunKeeperOnVariant(builder)) {
      builder.registerExtension(KeeperVariantMarker.class, KeeperVariantMarker.INSTANCE)
    }
  }
}

works.

Also, it would be great to have in red flashing lights that the default behaviour of just applying the plugin changed in the this section https://slackhq.github.io/keeper/#installation saying that this block of configuration is required. Leaving it in the "Configuration" block makes it seem as optional.

Thanks for the great library.

juliocbcotta avatar Mar 25 '22 12:03 juliocbcotta

Wanna send a PR?

ZacSweers avatar Mar 25 '22 17:03 ZacSweers