Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // File: build.gradle
  2. apply plugin: 'cpp'
  3.  
  4. class SpecialConfig {
  5. NativeComponentSpec componentSpec
  6.  
  7. SpecialConfig(NativeComponentSpec componentSpec) {
  8. this.componentSpec = componentSpec
  9. }
  10.  
  11. def something(boolean enabled) {
  12. componentSpec.sources {
  13. cpp {
  14. // Some important stuffs
  15. }
  16. }
  17. }
  18. }
  19.  
  20. model {
  21. components {
  22. main(NativeLibrarySpec) {
  23. // How to bring this out ??
  24. project.extensions.create('specialConfig', SpecialConfig, it)
  25.  
  26. // This is the new functionality I want to use
  27. specialConfig {
  28. something(true)
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement