Giter Site home page Giter Site logo

Comments (2)

hsz avatar hsz commented on August 17, 2024

It is possible to achieve it with:

val runIdeWithPlugins by intellijPlatformTesting.runIde.registering {
    plugins {
        plugin("com.google.ide-perf:1.3.1")
    }

    prepareSandboxTask {
        dependsOn("downloadAptosBinaries")
        from("${rootDir}/cert") {
            into(intellijPlatform.projectName.map { "$it/bin" })
            include("**")
        }
    }
}

To make it more transparent, I've introduced the projectName property (39161c0), so with the next release, you'll be able to:

val runIdeWithPlugins by intellijPlatformTesting.runIde.registering {
    // ...

    prepareSandboxTask {
        // ...

        from("${rootDir}/cert") {
            into(pluginName.map { "$it/bin" })
        }
    }
}

from intellij-platform-gradle-plugin.

mkurnikov avatar mkurnikov commented on August 17, 2024

I tried to specify prepareSandboxTask {} configuration inside the runIdeWithPlugins task, and this indeed works, there's no need for the intellijPlatform.projectName (sandboxSuffix has the expected value of _runIdeWithPlugins, and the pluginName exists in my environment anyway). I'm going to extract the common copying code into the function and call it twice from inside the runIdeWithPlugins and from the general prepareSandboxTask checking for the existence of the directory.

I want to clarify that my problem is not fixed with the intellijPlatform.projectName. I need to patch prepareSandboxTask both for buildPlugin and for runIde, so in general case patching it inside the custom task does not work.

My understanding is that there's some special case code inside the gradle plugin, that creates the prepareSandboxTask_runIdeWithPlugins custom task specifically for my runIdeWithPlugins custom task, and it executes the body of the

    prepareSandboxTask {
        from("${rootDir}/cert") {
            into(intellijPlatform.projectName.map { "$it/bin" })
            include("**")
        }
    }

(which is defined outside the custom task as it's shared for the deployment and for testing). And the bug report is that sandboxSuffix (or sandboxPluginsDirectory for that matter) is not populated correctly at the time of execution of the body of that prepareSandboxTask_runIdeWithPlugins.

UPD.
Ok, I think I just might be doing it incorrectly. It seems I can't really patch generated prepareSandboxTask_runIdeWithPlugins with the root level

tasks {
    prepareSandboxTask {
    
    }
}

at all, it's never called. So to provide binaries both to the buildPlugin and to runIde I need to use two blocks of prepareSandboxTask. Is that right?

from intellij-platform-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.