Adding Properties to JavaPlugin's SourceSets


(Kevin Brightwell) #1

We’re trying to draft a plugin to work with our modelling language, Umple. We want to make it as “ergonomic” as possible and allow for specifying properties at the “sourceSet” level.

For example,

sourceSets {
  main { 
    umple {
      foo = 'bar'
    }
  }
}

umple { // defaults
  foo = 'baz'
}

We have tried adding extensions to the source sets and tried to model the approach after how the Scala and Antlr plugins work. However, we can not figure out how to add extra properties to the sourceSet closure application. Any help is appreciated.


(Kevin Brightwell) #2

Found results thanks to StackOverflow here: http://stackoverflow.com/questions/42912317/adding-properties-to-javaplugin-s-sourcesets-gradle

:slight_smile: