Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see additional sourceSets in project explorer #40

Closed
fwelland opened this issue May 9, 2013 · 5 comments
Closed

Can't see additional sourceSets in project explorer #40

fwelland opened this issue May 9, 2013 · 5 comments

Comments

@fwelland
Copy link

fwelland commented May 9, 2013

My gradle root file has some sourcesets like:

sourceSets {
    main {
        compileClasspath += configurations.provided
    }

    integrationTest {
        java.srcDir file('src/integTest/java')
        resources.srcDir file('src/integTest/resources')
        compileClasspath = sourceSets.main.output + configurations.testRuntime
        runtimeClasspath = output + compileClasspath
    }

    soapAccepTest {
        java.srcDir file('src/soapAccepTest/java')
        resources.srcDir file('src/soapAccepTest/resources')
        compileClasspath = sourceSets.main.output + configurations.testRuntime
        runtimeClasspath = output + compileClasspath
    }
}

In my sub projects, my project explorer looks like this:

screenshot from 2013-05-09 18 47 05

My sub-project's directory mostly follows Maven like structures, like this:

screenshot from 2013-05-09 18 49 25

Can a future plugin revision include the ability to display custom sources sets in the project explorer?

@kelemen
Copy link
Owner

kelemen commented May 9, 2013

As of currently there is no support for this in the Tooling API of Gradle. So until it is fixed in Gradle, I cannot implement this.

What you can do is to manually add it through the idea plugin:

apply plugin: 'idea'

idea {
    module {
        testSourceDirs += file('src/integTest/java')
        testSourceDirs += file('src/integTest/resources')
        testSourceDirs += file('src/soapAccepTest/java')
        testSourceDirs += file('src/soapAccepTest/resources')
    }
}

I will leave this issue open in hope that sometime this feature will be added to the Tooling API.

@fwelland
Copy link
Author

wow....Cool! Thanks for keeping open as feature addition. Also thanks for tip about idea -- that actually worked for me.

@kelemen
Copy link
Owner

kelemen commented Oct 15, 2013

This should know be fixed in 1.2.7. Note that you need to download this release manually. Also, you have to use the nightly build of Gradle "1.10-20131011231056+0000" or later. Once 1.9 (rc) is release, you can use that too.

Note that Gradle 1.8 will brake each version of the NetBeans plugin.

@kelemen kelemen closed this as completed Oct 15, 2013
@jzwolak
Copy link

jzwolak commented Nov 27, 2013

Consider

testSourceDirs += sourceSets.integrationTest.java.srcDirs
testSourceDirs += sourceSets.integrationTest.resources.srcDirs

@kelemen
Copy link
Owner

kelemen commented Nov 27, 2013

Which version of Gradle and which version of the plugin are you using? Also, what do you have set for "Build script evaluation strategy" in the global settings (Misc/Gradle)? "Newest possible" ignores the idea plugin but should see custom source sets, if they exist (i.e., directory is actually created). You can now create the directories from the plugin by choosing "Create source roots" in the project's context menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants