Skip to content

How do I configure FileAssociations in gradle #197

@jinsihou19

Description

@jinsihou19

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

How do I configure FileAssociations in gradle?

I write this code:

def association = new FileAssociation()
association.extension = 'log'
association.description = 'log_analyzer'
association.mimeType = 'text/plain'

task packageAppForMac(type: PackageTask, dependsOn: shadowJar) {
    appName = project.name
    platform = 'mac'
    fileAssociations  = [
            association
    ]
}

after run it report that:

Unable to store input properties for task ':packageAppForMac'. Property 'fileAssociations' with value '[FileAssociation [mimeType=text/plain, extension=log, description=log]]' cannot be serialized.

Please tell us about your environment:

  • JavaPackager version:
  • OS version: macos 12.3.1
  • JDK version: 1.8.0_181
  • Build tool:
    • Maven
    • Gradle

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedIssue fixed and release pending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions