I can’t seem to find out how to do a similar action with Gradle 2.0, because the code above throws:
> Extension of type 'PlatformContainer' does not exist. Currently registered extension types: [DefaultExtraPropertiesExtension, DefaultArtifactPublicationSet_Decorated, DefaultProjectComponentContainer_Decorated, DefaultProjectSourceSet_Decorated, DefaultBinaryContainer_Decorated, DefaultNativeComponentExtension_Decorated, DefaultNamedDomainObjectSet_Decorated, TypedDomainObjectContainerWrapper_Decorated, TypedDomainObjectContainerWrapper_Decorated, DefaultPublishingExtension_Decorated, ReportingExtension_Decorated]
I’m trying to hook into what platforms have been specified in the build file in order to create tasks based on the platform/architecture configurations.
The last remaining issue I’m having is that the publishing mechanism doesn’t seem to be able to see these tasks during publication configuration time. If I add a “builtBy” function into the artifact… such as:
These incubating features are under heavy development as we migrate to the new configuration model. This affects the native component model as well as the ‘new’ publishing model. It’s a rapidly moving target, and your best bet would be to stick with a working version, or track the progress closely.
Until the new publishing plugins are fully converted to model rules, it’s going to be tough to get them working together with the native stuff.