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

Ability to customize auxclasspath based on sourceSet #135

Open
vladimirfx opened this issue Mar 28, 2019 · 1 comment
Open

Ability to customize auxclasspath based on sourceSet #135

vladimirfx opened this issue Mar 28, 2019 · 1 comment

Comments

@vladimirfx
Copy link

vladimirfx commented Mar 28, 2019

Currently there is no easy way to use different classpath from source set.

Field sourceSet is private in SpotBugsTask. Please add getter for sourceSet to get this working:

withType<SpotBugsTask> {
        classpath = sourceSet.compileClasspath
    }
@vladimirfx
Copy link
Author

Workaround:

    withType<SpotBugsTask> {
        val sourceSetName = name.substring(8).toLowerCase()
        sourceSets.findByName(sourceSetName)?.let {
            classpath = it.compileClasspath
        }
    }

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

2 participants