Skip to content

Gradle : allow Eclipse XML from a string as well #2436

Open
@rnc

Description

@rnc

This is a follow on from #2343 (which is great!) produced by @tomasbjerre. I have a remote deployed IDE configuration (that we use for both maven and gradle). Ideally, rather than having a local copy I'd like to use the remote one. However it seems the new option doesn't allow a eclipse-format.xml to be passed as a string i.e.

    val spotlessConfig by configurations.creating
    dependencies {
        spotlessConfig("org.....:ide-config:1.1.0")
    }

    spotless {
        java {
             logger.warn("#### Found " + resources.text.fromArchiveEntry(spotlessConfig, "java-formatter.xml").asString())
                eclipse().configProperties(resources.text.fromArchiveEntry(spotlessConfig, "java-formatter.xml").asString())
 //            eclipse().configFile("$rootDir/ide-config/eclipse-format.xml")
     }

I realise I can't use asFile on the resources.text.fromArchiveEntry as that then clashes with Gradle and clean erases the file hence trying this alternate route.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions