Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. Define variable in root project and access it in subprojects by using extra
  2.  
  3. 1) val foo: String by extra["hello"]
  4. 2) extra["foo"] = "hello"
  5. 3)
  6. buildScript {
  7. extra.apply {
  8. set("foo", "hello")
  9. }
  10. }
  11.  
  12. // Access the extra variables in subprojects:
  13. rootProject.extra["foo"] as String
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement